سلام دوستان من برای نیوک یه سایت مپ ساختم که به روز باشه این سایت مپ در اصل پی اچ پی هست جدول مطالب رو سلکت می کنه و sitemap.xml رو دایرکت کردم به sitemap.php نمی دونم وقتی به ساب میت می کنم سایت مپ چندتا warning میگیره !
.
اینم کد :
نقل قول:Paths don't match
We've detected that you submitted your Sitemap using a URL path that doesn't include the www prefix (for instance, http://example.com/sitemap.xml). However, the URLs listed inside your Sitemap do use the www prefix (for instance, http://www.example.com/myfile.htm).
Incorrect namespace
Your Sitemap or Sitemap index file doesn't properly declare the namespace
![[عکس: mykqay1gcvv3f6zy2ugy.gif]](http://www.mihanupload.com/images/mykqay1gcvv3f6zy2ugy.gif)
اینم کد :
کد پیاچپی:
header("Content-Type: text/xml");
echo'<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
';
include"config.php";
$connect=mysql_connect($dbhost,$dbuname,$dbpass) or die(mysql_error());
mysql_select_db($dbname,$connect)or die(mysql_error());
$Query_article=mysql_query(" SELECT * FROM `nuke_stories` order by `sid` DESC LIMIT 0 , 50000 ");
while($Rows=mysql_fetch_array($Query_article)){
$sitemap.="<url>";
$sitemap.=" <loc>http://test.com/article".$Rows['sid'].".html</loc>";
$sitemap.=" <lastmod>2009-09-29T11:44:04+00:00</lastmod>";
$sitemap.=" <changefreq>daily</changefreq>";
$sitemap.=" <priority>0.80</priority>";
$sitemap.="</url>";
}
echo $sitemap;
echo'</urlset>';