帝国CMS如何自动生成sitemap.xml网站地图
帝国CMS如何自动生成sitemap.xml网站地图?
步骤:
-  
登录网站的后台http://你的域名/e/admin/ 进入后台栏目 =》增加自定义页面 =》选择直接页面,页面名称为:网站地图,文件名修改为 ../../sitemap.xml
 


2.具体sitemap.xml模板代码,标准如下:
 <?='<?xml version="1.0" encoding="UTF-8"?>'?>    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">     <url>         <loc>[!--news.url--]</loc>         <changefreq>daily</changefreq>         <priority>1.0</priority>     </url>     <url>         <loc>[!--news.url--]hmoban</loc>         <changefreq>daily</changefreq>         <priority>0.8</priority>     </url>     <url>         <loc>[!--news.url--]wpyuanma</loc>         <changefreq>daily</changefreq>         <priority>0.8</priority>     </url>     <url>         <loc>[!--news.url--]diguoCMS</loc>         <changefreq>daily</changefreq>         <priority>0.8</priority>     </url>     <url>         <loc>[!--news.url--]news</loc>         <changefreq>daily</changefreq>         <priority>0.8</priority>     </url>                [e:loop={1,30000,3,1,'','newstime DESC'}]     <url>         <loc><?=$bqsr['titleurl']?></loc>         <lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>         <changefreq>monthly</changefreq>         <priority>0.7</priority>     </url>     [/e:loop]  [e:loop={2,30000,3,1,'','newstime DESC'}]     <url>         <loc><?=$bqsr['titleurl']?></loc>         <lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>         <changefreq>monthly</changefreq>         <priority>0.7</priority>     </url>     [/e:loop]  [e:loop={3,30000,3,1,'','newstime DESC'}]     <url>         <loc><?=$bqsr['titleurl']?></loc>         <lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>         <changefreq>monthly</changefreq>         <priority>0.7</priority>     </url>     [/e:loop]  [e:loop={4,30000,3,1,'','newstime DESC'}]     <url>         <loc><?=$bqsr['titleurl']?></loc>         <lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>         <changefreq>monthly</changefreq>         <priority>0.7</priority>     </url>     [/e:loop]   </urlset> 
注意:[e:loop={栏目ID,30000,3,1,'','newstime DESC'}] 中栏目ID,可以修改成后台所有ID,不够就直接增加。
3.设置自动更新功能,手动刷新生成自页面。
   

4.全部完成后,请打开http://你的域名/sitemap.xml,查看后满意即可。
声明
源码下载不顺利,比如源码在百度网盘的有时会被无故取消等,请联系QQ:46667551
本站大部分下载资源收集于网络,但除特别说明之外,基本全部亲自测试可用!
但由于某些源码的更新迭代,比如微信小程序官方接口的变动等原因,
如时间过长,可能会造成本可以使用的代码出现问题,下载前请斟酌!
本站资源仅供学习和交流使用,版权归原作者所有,请在下载后24小时之内自觉删除。
若作商业用途,请购买正版,由于未及时购买和付费发生的侵权行为,使用者自行承担,概与本站无关。
原文链接:http://www.love0312.com/845.html,转载请注明出处

    