织梦去掉面包屑导航里面index.html的方法


文章介绍

  为了百度权重合理分配我们对站点URL布局需要重视,那么根据一些SEO的建议要修改织梦的站点面包屑里面的index.html,并且把默认的index.html 去掉显示。

  修改PHP源文件,这里提醒大家一定要备份好文件,包含head.htm 或者PHP channelunit.helper.php

  路径是include/helpers/channelunit.helper.php 找到这个文件然后,打开channelunit.helper.php

  找到$sitepath = MfTypedir($sitepath);在if($isdefault==-1)前面加入以下代码

1 2 3 4 5 6 7 //跳转网址 if($ispart>2){   return $typedir; } if($defaultname == ‘index.html’){   $defaultname = ”; }