织梦把普通地图改为xml
发布时间:2020-12-16 05:52:46 所属栏目:百科 来源:网络整理
导读:一. 织梦 DEDECMSsitemap.html 位置的更改 sitemap.html默认的位置时在data文件夹下面的,但是一般我们为了优化,会放在根目录,如何放在根目录呢? 首先找到------dede------makehtml_map.php 这样就OK了 2、 织梦如何生成sitemap.xml 1).复制一下代码,
一.织梦
DEDECMSsitemap.html
位置的更改 sitemap.html默认的位置时在data文件夹下面的,但是一般我们为了优化,会放在根目录,如何放在根目录呢? 首先找到------dede------makehtml_map.php 这样就OK了 2、织梦如何生成sitemap.xml 1).复制一下代码,并保存,例如gsitemap.htm等 <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> <url> <loc>{dede:global.cfg_basehost/}</loc> <lastmod>{dede:arclist row=1 titlelen=24 orderby=pubdate} [field:pubdate function=strftime('%Y-%m-%d',@me)/] {/dede:arclist}</lastmod> <changefreq>always</changefreq> <priority>1.0</priority> </url> {dede:channel row='1000' type='top'} <url> <loc>[field:typelink /]</loc> <changefreq>daily</changefreq> <priority>0.9</priority> </url> {/dede:channel} {dede:arclist row=2000 orderby=pubdate} <url> <loc>[field:arcurl/]</loc> <lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod> <changefreq>monthly</changefreq> <priority>0.8</priority> </url> {/dede:arclist} </urlset> 2)、上传到/wwwroot/templets/plus 3)、 4)、 5)、 6)、 7)、 如需转载,请注明来源:【魅网工作室】 (责任编辑:魅网工作室) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |