ERKIN7717
ushbu kod sitemapni avtomatik chiaradi bu krite newsga moslangan download sentr, library va hk ga moslab qo`yish mumkin sitemap.php ga bu kodlarni yozing
  1. define('_IN_JOHNCMS', 1);
  2. require_once ('incfiles/core.php');
  3. header('content-type: application/rss+xml');
  4. echo '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
  5. $req = mysql_query('SELECT * FROM `news` ORDER BY `id` DESC');
  6. if (mysql_num_rows($req)) {
  7. while ($res = mysql_fetch_assoc($req)) {
  8. ?>
  9. <url><loc><?=$home?>/news/index.php?act=view&amp;id=<?=$res['id']?>/</loc>
  10. <lastmod><?=date('Y-m-d',$res['time'])?>T<?=date('H:i:s',$res['time'])?>+00:00</lastmod>
  11. <priority>0.9</priority></url>
  12. <?
  13. }
  14. }


keyin .htaccess ga bu kodni yozing
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteRule ^news-sitemap.xml$ sitemap.php [L]


http://site.uz/news-sitemap.xml orali kiring