亲注册登录道勤网-可以查看更多帖子内容哦!(包涵精彩图片、文字详情等)请您及时注册登录-www.daoqin.net
您需要 登录 才可以下载或查看,没有账号?立即注册
x
URL 静态化可以提高搜索引擎抓取,开启本功能需要对 Web 服务器增加相应的 Rewrite 规则,且会轻微增加服务器负担。本教程讲解如何在 IIS 环境下配置各个产品的 Rewrite 规则。 一、首先下载 Rewrite.zip 的包,解压到任意盘上的任意目录。 各个产品的 Rewrite 规则包不同,请选择对应的产品下载对应的 Rewrite 规则。 discuz!6.0.0/6.1.0 的 Rewrite 规则下载地址: Rewrite.zip UCenter Home1.0.0 的 Rewrite规则下载地址: Rewrite.zip SupeSite6.0_X-Space4.0_UC 的Rewrite 规则下载地址: iisrewrite.zip SupeV 的 Rewrite 规则下载地址: rewrite_iis.zip 下载各个产品的 Rewrite 规则并且重命名后如下图所示存放:  二、配置方法 Discuz!、UCHome、SupeSite/X-Space、SupeV 的 Rewrite 配置方法类似,下面以 Discuz!6.0.0/6.1.0 的 Rewrite 规则配置方法为例讲解如何在 IIS 环境下配置 Rewrite 规则。 在 IIS 管理器里选择网站,右键选择“属性”,如下图所示:  在弹出的窗口里选择“ISAPI筛选器”  上图中点击“添加”,在弹出的窗口里“筛选器名称”填写“rewrite”  上图界面中点击“浏览”,选择下载解压后的 Discuz! Rewrite 规则目录下的 Rewrite.dll 文件  浏览完毕点击“确定”  添加完毕点击“确定”  重新启动 IIS  
重新选择该站点 => 右键“属性”=> “ISAPI 筛选器”,如果看到状态为向上的绿色箭头,就说明 Rewrite 模块安装成功了。  Rewrite 规则配置成功了,但是这个时候浏览论坛地址依旧不是伪静态的,还需要到论坛后台做相应的设置才可以。 论坛后台 => 全局 => 优化设置,下图中红色区域选项:  “URL 静态化”:如上图所示有五个选项,根据您的需求选择即可,最多可以选择五个,不选则不生效。 “Rewrtie 兼容性”:如果您的服务器不支持 Rewrite 规则中的中文字符,请选择“是”。对于没有此问题的服务器,可以选择“否”。 上面两项设置完毕“提交”保存即可。 这个时候返回到论坛首页随便打开一个版块或者一个帖子即可看到 Discuz! 的 Rewrite 伪静态配置成功! 

三、各个产品的 Rewrite 规则 httpd.ini 文件内容如下配置 [ISAPI_Rewrite]# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32# Discuz! Rewrite规则# 独立主机用户# Protect httpd.ini and httpd.parse.errors files# from accessing through HTTPRewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$4RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay\.php\?fid=$2&page=$3&$4RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3&$4RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag\.php\?name=$2&$3# SupeSite Rewrite规则# 独立主机用户# 修改以下语句中的 /supesite 修改为你的SupeSite目录地址,如果程序放在根目录中,请将 /supesite 修改为 /RewriteRule ^/supesite/([0-9]+)$ /supesite/index\.php\?uid/$1 [L]RewriteRule ^/supesite/([0-9]+)/spacelist(.+)$ /supesite/index\.php\?uid/$1/action/spacelist/type$2 [L]RewriteRule ^/supesite/([0-9]+)/viewspace(.+)$ /supesite/index\.php\?uid/$1/action/viewspace/itemid$2 [L]RewriteRule ^/supesite/([0-9]+)/viewbbs(.+)$ /supesite/index\.php\?uid/$1/action/viewbbs/tid$2 [L]RewriteRule ^/supesite/([0-9]+)/(.*)$ /supesite/index\.php\?uid/$1/$2 [L]RewriteRule ^/supesite/action(.+)$ /supesite/index\.php\?action$1 [L]RewriteRule ^/supesite/category(.+)$ /supesite/index\.php\?action/category/catid$1 [L]RewriteRule ^/supesite/viewnews(.+)$ /supesite/index\.php\?action/viewnews/itemid$1 [L]RewriteRule ^/supesite/viewthread(.+)$ /supesite/index\.php\?action/viewthread/tid$1 [L]RewriteRule ^/supesite/mygroup(.+)$ /supesite/index\.php\?action/mygroup/gid$1 [L]# UCHome Rewrite规则# 独立主机用户# 修改以下语句中的 /uchome 修改为你的uchome目录地址,如果程序放在根目录中,请将 /uchome 修改为 /RewriteRule ^/uchome/(space|network)-(.+)\.html$ /uchome/$1\.php\?rewrite=$2 [L]RewriteRule ^/uchome/(space|network)\.html$ /uchome/$1\.php [L]RewriteRule ^/uchome/([0-9]+)$ /uchome/space\.php\?uid=$1 [L] # SupeV Rewrite规则# 独立主机用户RewriteRule ^(.*)/ivideo(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ $1/ivideo\.php\?tv=$3&ti=$5&tc=$7&page=$9RewriteRule ^(.*)/ispecial(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ $1/ispecial\.php\?tv=$3&ti=$5&tc=$7&page=$9RewriteRule ^(.*)/icategory\.html$ $1/icategory\.phpRewriteRule ^(.*)/category-cid-([0-9]+)(-tag-([^-]*))?(-timelimit-([0-9]+))?(-orderlimit-([0-9]+))?(-page-([0-9]+))?\.html$ $1/category\.php\?cid=$2&tag=$4&timelimit=$6&orderlimit=$8&page=$10RewriteRule ^(.*)/vspace-(mid|username)-(.+)\.html$ $1/vspace\.php\?$2=$3RewriteRule ^(.*)/video-(vid|ivid)-(.+)\.html$ $1/video\.php\?$2=$3RewriteRule ^(.*)/special-spid-([0-9]+)\.html$ $1/special\.php\?spid=$2道勤主机提供365天*24小时全年全天无休、实时在线、零等待的售后技术支持。竭力为您免费处理您在使用道勤主机过程中所遇到的一切问题!
如果您是道勤主机用户,那么您可以通过QQ【792472177】、售后QQ【59133755】、旺旺【诠释意念】、微信:q792472177免费电话、后台提交工单这些方式联系道勤主机客服!
如果您不是我们的客户也没问题,点击页面最右边的企业QQ在线咨询图标联系我们并购买后,我们为您免费进行无缝搬家服务,让您享受网站零访问延迟的迁移到道勤主机的服务! |