Emlog去除伪静态分类网址中的sort方法

把sort去掉,直接显示网址/分类别名的形式,这样有利于搜索引擎收录,也使网址更加简明。

需要修改的文件有两个:

include\lib\url.php
include\lib\dispatcher.php

修改方法:

在include\lib\url.php文件中

找到
$sortUrl = BLOG_URL . 'sort/' . $sort_index;
替换为
$sortUrl = BLOG_URL. $sort_index;
找到
$sortUrl = BLOG_URL . 'sort/' . $sort_index . '/page/';
替换为
$sortUrl = BLOG_URL . $sort_index . '/page/';

在include\lib\dispatcher.php文件中

找到
return $path;
替换为
if($path!="/"&&substr($path,0,6)!="/sort/"&&substr($path,0,2)!="/?") {
return "/sort".$path;
} else {
return $path;
}
购买后下载不了源码或源码功能失效请联系小编,确认后可立即退款,请勿无理投诉
© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 共2条

请登录后发表评论

    暂无评论内容