2017-06-17 1 views
0

Mon site est comme un moteur de recherche, quelque chose comme ceci:Comment créer un sitemap pour les URL hostiles.

example.com 
example.com/result/index.php?tag1=xyz&tag2=Empty 

Mais, si j'utilise URL non amical comme ?tag1=xyz&tag2=Empty

Je reçois cette erreur dans le plan Sitemap fichier xml

error on line 12 at column 83: EntityRef: expecting '; 

Voici mon code `

<url> 
    <loc>http://example.com/</loc> 
</url> 
<url> 
    <loc>http://example.com/result/index.php?tag1=abc&tag2=Empty/</loc> 
</url> 
<url> 

Répondre

0

Try This .. (utilisation <![CDATA[ ...... ]]>)

<url> 
    <loc>http://example.com/</loc> 
</url> 
<url> 
    <loc><![CDATA[http://example.com/result/index.php?tag1=abc&tag2=Empty/]]></loc> 
</url> 
<url> 

OU (Remplacer & avec &amp;)

<url> 
    <loc>http://example.com/</loc> 
</url> 
<url> 
    <loc> http://example.com/result/index.php?tag1=abc&amp;tag2=Empty </loc> 
</url> 
<url>