DiscuzX3.0X3.1X3.2通用伪静态设置和伪静态规则

上传人:平*** 文档编号:10841733 上传时间:2017-10-10 格式:DOC 页数:7 大小:75.41KB
返回 下载 相关 举报
DiscuzX3.0X3.1X3.2通用伪静态设置和伪静态规则_第1页
第1页 / 共7页
DiscuzX3.0X3.1X3.2通用伪静态设置和伪静态规则_第2页
第2页 / 共7页
DiscuzX3.0X3.1X3.2通用伪静态设置和伪静态规则_第3页
第3页 / 共7页
DiscuzX3.0X3.1X3.2通用伪静态设置和伪静态规则_第4页
第4页 / 共7页
DiscuzX3.0X3.1X3.2通用伪静态设置和伪静态规则_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《DiscuzX3.0X3.1X3.2通用伪静态设置和伪静态规则》由会员分享,可在线阅读,更多相关《DiscuzX3.0X3.1X3.2通用伪静态设置和伪静态规则(7页珍藏版)》请在金锄头文库上搜索。

1、Discuz! X3.0/X3.1/X3.2 通用 伪静态设置和伪静态规则首先简单讲一下为什么要做伪静态,伪静态是相对真实静态来讲的,通常我们为了增强搜索引擎的友好面,都将文章内容生成静态 页面,但是有的朋友为了实时的显示一些信息。或者还想运用动态脚本解决一些问题。不能用静态的方式来展示网站内容。但是这就损失了对搜索引擎的友好面。怎 么样在两者之间找个中间方法呢,这就产生了伪静态技术。就是展示出来的是以 html 一类的静态页面形式,这种 html 的显示形式更加有利于 SEO。现在开源程序越来越流行了,很多新手站长在用 Discuz 程序搭建网站后,会发现自己的网站地址是动态地址,所谓动态地

2、址就是带有?号这种,比如http:/ html 结尾的网址,该如何做呢?1.在后台“全局SEO 设置URL 静态化”相关复选框全部勾选,点“提交”按钮。如下图2.根据 web 服务器选择相应的伪静态规则:Apache Web Server(独立主机用户)RewriteEngine OnRewriteCond %QUERY_STRING (.*)$RewriteRule (.*)/topic-(.+).html$ $1/portal.php?mod=topic&topic=$2&%1RewriteCond %QUERY_STRING (.*)$RewriteRule (.*)/article-(

3、0-9+)-(0-9+).html$ $1/portal.php?mod=view&aid=$2&page=$3&%1RewriteCond %QUERY_STRING (.*)$RewriteRule (.*)/forum-(w+)-(0-9+).html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1RewriteCond %QUERY_STRING (.*)$RewriteRule (.*)/thread-(0-9+)-(0-9+)-(0-9+).html$ $1/forum.php?mod=viewthread&tid=$2&extra

4、=page%3D$4&page=$3&%1RewriteCond %QUERY_STRING (.*)$RewriteRule (.*)/group-(0-9+)-(0-9+).html$ $1/forum.php?mod=group&fid=$2&page=$3&%1RewriteCond %QUERY_STRING (.*)$RewriteRule (.*)/space-(username|uid)-(.+).html$ $1/home.php?mod=space&$2=$3&%1RewriteCond %QUERY_STRING (.*)$RewriteRule (.*)/blog-(0

5、-9+)-(0-9+).html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&%1RewriteCond %QUERY_STRING (.*)$RewriteRule (.*)/(fid|tid)-(0-9+).html$ $1/index.php?action=$2&value=$3&%1RewriteCond %QUERY_STRING (.*)$RewriteRule (.*)/(a-z+a-z0-9_*)-(a-z0-9_-+).html$ $1/plugin.php?id=$2:$3&%1Apache Web Server(虚拟主机用户)#

6、 将 RewriteEngine 模式打开RewriteEngine On# 修改以下语句中的 /discuz 为您的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /RewriteBase /discuz# Rewrite 系统规则请勿修改RewriteCond %QUERY_STRING (.*)$RewriteRule topic-(.+).html$ portal.php?mod=topic&topic=$1&%1RewriteCond %QUERY_STRING (.*)$RewriteRule article-(0-9+)-(0-9+).html$ portal.

7、php?mod=view&aid=$1&page=$2&%1RewriteCond %QUERY_STRING (.*)$RewriteRule forum-(w+)-(0-9+).html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1RewriteCond %QUERY_STRING (.*)$RewriteRule thread-(0-9+)-(0-9+)-(0-9+).html$ forum.php?mod=viewthread&tid=$1&extra=page%3D$3&page=$2&%1RewriteCond %QUERY_STRIN

8、G (.*)$RewriteRule group-(0-9+)-(0-9+).html$ forum.php?mod=group&fid=$1&page=$2&%1RewriteCond %QUERY_STRING (.*)$RewriteRule space-(username|uid)-(.+).html$ home.php?mod=space&$1=$2&%1RewriteCond %QUERY_STRING (.*)$RewriteRule blog-(0-9+)-(0-9+).html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1Rewrit

9、eCond %QUERY_STRING (.*)$RewriteRule archiver/(fid|tid)-(0-9+).html$ archiver/index.php?action=$1&value=$2&%1RewriteCond %QUERY_STRING (.*)$RewriteRule (a-z+a-z0-9_*)-(a-z0-9_-+).html$ plugin.php?id=$1:$2&%1IIS Web Server(独立主机用户)ISAPI_Rewrite# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32# Protect

10、httpd.ini and httpd.parse.errors files# from accessing through HTTPRewriteRule (.*)/topic-(.+).html(?(.*)*$ $1/portal.php?mod=topic&topic=$2&$4RewriteRule (.*)/article-(0-9+)-(0-9+).html(?(.*)*$ $1/portal.php?mod=view&aid=$2&page=$3&$5RewriteRule (.*)/forum-(w+)-(0-9+).html(?(.*)*$ $1/forum.php?mod=

11、forumdisplay&fid=$2&page=$3&$5RewriteRule (.*)/thread-(0-9+)-(0-9+)-(0-9+).html(?(.*)*$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3&$6RewriteRule (.*)/group-(0-9+)-(0-9+).html(?(.*)*$ $1/forum.php?mod=group&fid=$2&page=$3&$5RewriteRule (.*)/space-(username|uid)-(.+).html(?(.*)*$ $1/ho

12、me.php?mod=space&$2=$3&$5RewriteRule (.*)/blog-(0-9+)-(0-9+).html(?(.*)*$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&$5RewriteRule (.*)/(fid|tid)-(0-9+).html(?(.*)*$ $1/index.php?action=$2&value=$3&$5RewriteRule (.*)/(a-z+a-z0-9_*)-(a-z0-9_-+).html(?(.*)*$ $1/plugin.php?id=$2:$3&$5IIS7 Web Server(独立

13、主机用户) Zeus Web Servermatch URL into $ with (.*)/topic-(.+).html?*(.*)$if matched thenset URL = $1/portal.php?mod=topic&topic=$2&$3endifmatch URL into $ with (.*)/article-(0-9+)-(0-9+).html?*(.*)$if matched thenset URL = $1/portal.php?mod=view&aid=$2&page=$3&$4endifmatch URL into $ with (.*)/forum-(w

14、+)-(0-9+).html?*(.*)$if matched thenset URL = $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4endifmatch URL into $ with (.*)/thread-(0-9+)-(0-9+)-(0-9+).html?*(.*)$if matched then set URL = $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3&$5endifmatch URL into $ with (.*)/group-(0-9+)-(0-9

15、+).html?*(.*)$if matched thenset URL = $1/forum.php?mod=group&fid=$2&page=$3&$4endifmatch URL into $ with (.*)/space-(username|uid)-(.+).html?*(.*)$if matched thenset URL = $1/home.php?mod=space&$2=$3&$4endifmatch URL into $ with (.*)/blog-(0-9+)-(0-9+).html?*(.*)$if matched thenset URL = $1/home.php?mod=space&uid=$2&do=blog&id=$3&$4endifmatch URL into $ with (.*)/(fid|tid)-(0-9

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 试题/考题 > 初中试题/考题

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号