ob_start();
session_start();
require_once("ayar.php");
echo '
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
';
echo '
<url>
<loc>'.$siteadresi.'</loc>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
';
$haber = mysql_query("select link from haberler");
while($haberler = mysql_fetch_assoc($haber)) {
echo '
<url>
<loc>'.$siteadresi.'/haber/'.$haberler['link'].'.html</loc>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
';
}
echo '
</urlset>
';Ben bu sekilde kullanıyorum. Sitemap.php olarak kaydedip htaccess ten xml olarak gosterebilirsin. Hiçbir yerde sorun cıkartmaz. İlla fiziksel olarak XML dosyası oluşturman şart değilse tabi.