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

这是初夏,陽光灿烂,海水湛蓝,海鸥轻巧地向船桅间滑过,生命是多彩的,充满了青春的欢乐。

# 二级栏目301重定向到二级域名方法,如将http://www.17hdy.com/bbs/重定向http://bbs.17hdy.com 

  1. RewriteCond %{http_host} ^17hdy.com [NC]  
  2. RewriteRule ^(.*)$ http://www.17hdy.com/$1 [L,R=301]  
  3. # Protect httpd.ini and httpd.parse.errors files  
  4. # from accessing through HTTP  
  5. 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状态,之后的所有跳转均为301
header('location:
http://bbs.17hdy.com/'.
# tipask静态规则

allow_url_fopen = On
RewriteRule ^(.*)/c-([0-9]+)\.html$ $1/index\.php\?category/view/$2.html
RewriteRule ^(.*)/l-([0-9]+)\.html$ $1/index\.php\?category/list/$2.html
RewriteRule ^(.*)/r-([0-9]+)\.html$ $1/index\.php\?category/recommend/$2.html
RewriteRule ^(.*)/q-([0-9]+)\.html$ $1/index\.php\?question/view/$2.html
RewriteRule ^(.*)/u-([0-9]+)\.html$ $1/index\.php\?user/space/$2.html
RewriteRule ^(.*)/us-([0-9]+)\.html$ $1/index\.php\?user/scorelist/$2.html
RewriteRule ^(.*)/c-([0-9]+)/([0-9]+)\.html$ $1/index\.php\?c-$2/$3.html
RewriteRule ^(.*)/c-([0-9]+)/all/([0-9]+)\.html$ $1/index\.php\?c-$2/all/$3.html
RewriteRule ^(.*)/c-([0-9]+)/all\.html$ $1/index\.php\?c-$2/all\.html
RewriteRule ^(.*)/c-([0-9]+)/([0-9]+)/([0-9]+)\.html$ $1/index\.php\?c-$2/$3/$4.html
RewriteRule ^(.*)/c-([0-9]+)/([0-9]+)\.html$ $1/index\.php\?c-$2/$3.html
RewriteRule ^(.*)/l-([0-9]+)/([0-9]+)\.html$ $1/index\.php\?l-$2/$3.html
RewriteRule ^(.*)/u-([0-9]+)\.html$ $1/index\.php\?u-$2.html
RewriteRule ^(.*)/r-([0-9]+)\.html$ $1/index\.php\?r-$2.html
RewriteRule ^(.*)/gift\.html$ $1/index\.php\?gift.html
RewriteRule ^(.*)/user/ask\.html$ $1/index\.php\?user/ask.html
RewriteRule ^(.*)/user/answer\.html$ $1/index\.php\?user/answer.html
RewriteRule ^(.*)/user/favorite\.html$ $1/index\.php\?user/favorite.html
RewriteRule ^(.*)/message/new\.html$ $1/index\.php\?message/new.html
RewriteRule ^(.*)/user/score\.html$ $1/index\.php\?user/score.html
RewriteRule ^(.*)/question/add\.html$ $1/index\.php\?question/add.html RewriteRule /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=$2
RewriteRule ^(.*)/browser-tid-([0-9]+)\.html$ $1/browser\.php\?tid=$2
RewriteRule ^(.*)/browser-tid2-([0-9]+)\.html$ $1/browser\.php\?tid2=$2
RewriteRule ^(.*)/browser-lm-([0-9]+)\.html$ $1/browser\.php\?lm=$2
RewriteRule ^(.*)/browser-tid-([0-9]+)-lm-([0-9]+)\.html$ $1/browser\.php\?tid=$2&lm=$3
RewriteRule ^(.*)/browser-tid2-([0-9]+)-lm-([0-9]+)\.html$ $1/browser\.php\?tid2=$2&lm=$3

#DX2.0静态规则

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3&%1
</IfModule>

本文dx,tipask,dedeask静态规则,及二级栏目301重定向方法到此结束。爱情不合乎逻辑,这或许就是爱的逻辑。真正热爱的,或许并不是一个大家公认的最该爱,爱的最正确的人,而是一个使我忘乎所以,无法不爱的人。爱不是因为被爱,只是因为爱。小编再次感谢大家对我们的支持!

您可能有感兴趣的文章
360检测织梦系统dedecms重定向漏洞的如何解决方案

360检测Dedecms重定向漏洞的如何解决方案

DedeCMS5.7SP1系统/plus/download.php出现url重定向漏洞

DedeCMS系统301重定向配置方法

织梦dede程序怎么做301重定向