首页 > CMS建站 > Phpwind > 正文

DZ转到PW后,SS添加rewrite伪静态规则

2020-05-30 21:53:12
字体:
来源:转载
供稿:网友

DZ转到PW以后,需要在服务器端加入重写规则。
方法:将以下规则代码添加到httpd.conf 即可~

 RewriteEngine On
 ErrorDocument 404 /missing.html
 RewriteCond %{SCRIPT_FILENAME} ^/pw6/$  [NC]
 RewriteCond %{QUERY_STRING} action-viewthread-tid-(/d+) [NC]
 RewriteRule (.*)  /%{QUERY_STRING} [NC]
 RewriteRule ^/action-viewthread-tid-(/d+)   /pw6/read.php?tid=$1 
 RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
 RewriteRule ^(.*)simple/([t|f].+).html$ /simple/index.php?$2.html [NC,L]
  

其中 /pw6 为论坛目录,请根据实际情况修改。如果是根目录,直接去掉 /pw6 
修改完毕,保存,重启服务器即可。
      

 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选