您的位置:首页 > 运维架构 > 网站架构

修改dedecms的sitemap网站地图的路径到根目录

2012-12-04 09:49 225 查看
自定义dedecms的sitemap网站地图的路径

打开/dede/makehtml_map.php,找到

if($dopost=="site")

{

$murl = $cfg_cmspath."/data/sitemap.html";

$tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm";

}


如果你要修改形如:http://www.guoxiongjie.com/sitemap.html ,则把上面的代码修改为:

if($dopost=="site")

{

$murl = $cfg_cmspath."/sitemap.html";

$tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm";

}


如果你要修改形如:http://www.guoxiongjie.com/sitemap/ ,则在根目录下建一个空文件夹,取名为sitemap(或者其他名字),然后把上面的代码修改为:

if($dopost=="site")

{

$murl = $cfg_cmspath."/sitemap/index.html";

$tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm";

}


以上为sitemap路径的修改方法,另外,我们要做到满意的状态,我们还需要修改sitemap的模板,即/templets/plus/sitemap.htm,以及/include/sitemap.class.php 这一个文件
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: