|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
要养成原文件备份的好习惯。演示地址:https://bbs.jatxh.cn/tag.html
1. 修改帖子内tag标签链接,使其伪静态。
打开template/default(模板风格)/forum/viewthread_node_body.htm,查找:
[color=rgb(51, 51, 51) !important]复制代码
替换为
[color=rgb(51, 51, 51) !important]复制代码
2. 修改tag页,使各个标签链接伪静态。
打开template/default/tag/tag.htm,查找
[color=rgb(51, 51, 51) !important]复制代码
替换为
[color=rgb(51, 51, 51) !important]复制代码
3. 修改tag列表页当前位置,使其路径链接伪静态。
打开template/default/tag/tagitem.htm,查找
[color=rgb(51, 51, 51) !important]复制代码
替换为
[color=rgb(51, 51, 51) !important]复制代码
再查找
[color=rgb(51, 51, 51) !important]复制代码
替换为
[color=rgb(51, 51, 51) !important]复制代码
4. 让搜索引擎蜘蛛可爬。
修改根目录下robort.txt,删除
Disallow: /misc.phpDisallow: /*?mod=misc*
[color=rgb(51, 51, 51) !important]复制代码
修改根目录下misc.php文件,注释或删除
[color=rgb(51, 51, 51) !important]复制代码
5. 添加伪静态规则。
linux系统(.htaccess或httpd.conf)伪静态规则:
RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^tag-(.+)\.html$ misc.php?mod=tag&id=$1RewriteCond %{QUERY_STRING} ^(.*)RewriteRule ^tag\.html$ misc.php?mod=tag
[color=rgb(51, 51, 51) !important]复制代码
WIN的添加(httpd.ini)伪静态规则:(未测,是否可用未知)
RewriteRule ^(.*)/tag-(.+)\.html*$ $1/misc.php\?mod=tag&id=$2RewriteRule ^(.*)/tag\.html*$ $1/misc.php\?mod=tag
[color=rgb(51, 51, 51) !important]复制代码
要保证规则文件内最后一条伪静态规则为
RewriteRule ^([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ plugin.php?id=$1:$2&%1
[color=rgb(51, 51, 51) !important]复制代码
或者
RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html(\?(.*))*$ $1/plugin\.php\?id=$2:$3&$5
[color=rgb(51, 51, 51) !important]复制代码
否则显示插件不存在或已关闭。
原文地址:https://bbs.jatxh.cn/thread-73980-1-1.html |
|