内容 |
我们知道网站地图对一个网站来说非常重要,至少在seo方面。那么织梦默认的sitemap路径是在/data/sitemap.html。 那么我们怎么修改这个路径呢? 第一步:打开/dede/makehtml_map.php,然后找到 代码如下: if($dopost=="site") { $murl = $cfg_cmspath."/data/sitemap.html"; $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm"; } 比如你要修改在网站根目录下,则可以把上面的代码修改为: 代码如下: if($dopost=="site") { $murl = $cfg_cmspath."/sitemap.html"; $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm"; } 以上为sitemap路径的修改方法,另外,我们要做到满意的状态,我们还需要修改sitemap的模板,即/templets/plus/sitemap.htm,以及/include/sitemap.class.php 这一个文件。
|