织梦把普通地图改为xml

来源:互联网 发布:网络教育选什么专业 编辑:程序博客网 时间:2024/06/05 07:27
一.织梦DEDECMS sitemap.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)、





如需转载,请注明来源:【魅网工作室


(责任编辑:魅网工作室)
0 0
原创粉丝点击