dx,tipask,dedeask静态规则,及二级栏目301重定向方法

# 二级栏目301重定向到二级域名方法,如将http://www.wangjinhi119.com/bbs/重定向http://bbs.wangjinhai119.com 
RewriteCond %{http_host} ^17hdy.com [NC]  RewriteRule ^(.*)$ http://www.wangjinhai119.com/$1 [L,R=301]  # Protect httpd.ini and httpd.parse.errors files  # from accessing through HTTP  RewriteRule ^(.*)/bbs/(.*)$ $1/bbs/301/.php/?go=$2 [L] 
# 301.php文件内容
<?php$go=$_GET['go'];//获取跳转页面链接部分,如"thread-112-1.html",又如forum.php?fid=32等header("HTTP/1.1 301 Moved Permanently");//发送301状态,之后的所有跳转均为301header('location:http://bbs.wangjinhai119.com/'.# tipask静态规则allow_url_fopen = OnRewriteRule ^(.*)/c-([0-9]+)/.html$ $1/index/.php/?category/view/$2.htmlRewriteRule ^(.*)/l-([0-9]+)/.html$ $1/index/.php/?category/list/$2.htmlRewriteRule ^(.*)/r-([0-9]+)/.html$ $1/index/.php/?category/recommend/$2.htmlRewriteRule ^(.*)/q-([0-9]+)/.html$ $1/index/.php/?question/view/$2.htmlRewriteRule ^(.*)/u-([0-9]+)/.html$ $1/index/.php/?user/space/$2.htmlRewriteRule ^(.*)/us-([0-9]+)/.html$ $1/index/.php/?user/scorelist/$2.htmlRewriteRule ^(.*)/c-([0-9]+)/([0-9]+)/.html$ $1/index/.php/?c-$2/$3.htmlRewriteRule ^(.*)/c-([0-9]+)/all/([0-9]+)/.html$ $1/index/.php/?c-$2/all/$3.htmlRewriteRule ^(.*)/c-([0-9]+)/all/.html$ $1/index/.php/?c-$2/all/.htmlRewriteRule ^(.*)/c-([0-9]+)/([0-9]+)/([0-9]+)/.html$ $1/index/.php/?c-$2/$3/$4.htmlRewriteRule ^(.*)/c-([0-9]+)/([0-9]+)/.html$ $1/index/.php/?c-$2/$3.htmlRewriteRule ^(.*)/l-([0-9]+)/([0-9]+)/.html$ $1/index/.php/?l-$2/$3.htmlRewriteRule ^(.*)/u-([0-9]+)/.html$ $1/index/.php/?u-$2.htmlRewriteRule ^(.*)/r-([0-9]+)/.html$ $1/index/.php/?r-$2.htmlRewriteRule ^(.*)/gift/.html$ $1/index/.php/?gift.htmlRewriteRule ^(.*)/user/ask/.html$ $1/index/.php/?user/ask.htmlRewriteRule ^(.*)/user/answer/.html$ $1/index/.php/?user/answer.htmlRewriteRule ^(.*)/user/favorite/.html$ $1/index/.php/?user/favorite.htmlRewriteRule ^(.*)/message/new/.html$ $1/index/.php/?message/new.htmlRewriteRule ^(.*)/user/score/.html$ $1/index/.php/?user/score.htmlRewriteRule ^(.*)/question/add/.html$ $1/index/.php/?question/add.htmlRewriteRule /ask/([a-z,0-9]*)-([a-z,0-9]*)-([0-9]+)/.html /ask/$1.php?$2=$3 RewriteRule ^(.*)/question-id-([0-9]+)/.html$ $1/question/.php/?id=$2RewriteRule ^(.*)/browser-tid-([0-9]+)/.html$ $1/browser/.php/?tid=$2RewriteRule ^(.*)/browser-tid2-([0-9]+)/.html$ $1/browser/.php/?tid2=$2RewriteRule ^(.*)/browser-lm-([0-9]+)/.html$ $1/browser/.php/?lm=$2RewriteRule ^(.*)/browser-tid-([0-9]+)-lm-([0-9]+)/.html$ $1/browser/.php/?tid=$2&lm=$3RewriteRule ^(.*)/browser-tid2-([0-9]+)-lm-([0-9]+)/.html$ $1/browser/.php/?tid2=$2&lm=$3mod=viewthread&tid=$2&extra=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 ^(.*)/([a-z]+)-(.+)/.html$ $1/$2.php?rewrite=$3&%1</IfModule>

支付宝扫码打赏 微信扫码打赏

如果本文对你有帮助,欢迎打赏本站

喜欢 ()or分享
    匿名评论
  • 评论
人参与,条评论