您现在的位置是:首页 > 教程 > dedecms教程dedecms教程
织梦dx tipask dedeask静态规则及二级栏目301重定向方法
依珊2023-10-03 22:31:22dedecms教程已有人查阅
导读# 二级栏目301重定向到二级域名方法,如将http://www.ebingou.cn/bbs/重定向http://bbs.ebingou.cn
# 二级栏目301重定向到二级域名方法,如将http://www.ebingou.cn/bbs/重定向http://bbs.ebingou.cn
RewriteCond %{http_host} ^ebingou.cn [NC]
RewriteRule ^(.*)$ http://www.ebingou.cn/$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状态,之后的所有跳转均为301
header('location:http://bbs.ebingou.cn/'.
# 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>
本文标签:
很赞哦! ()
相关文章
随机图文
-
织dedecms图集上传图片不加水印的修复方法
织梦的图集模型在上传图片时默认是不给图集加水印的,也没有自动加水印的选项,所以我们需要对其进行修改,具体方法如下: -
dedecms模板制作教程第四期Type标记使用说明和实例教程
本期讲解【Type 标记】,此标记主要用于指定单个栏目的链接,适用范围:封面模板,列表模板,文档模板。一:使用说明【Type 标记】的使用范围是:封面模板 -
dedecms搬家dede_purview错误数据库导入失败的解决办法
今天把服务器上面的织梦网站打包回本地重现的时候,数据库导入老是不成功,总是提示dede_purview表有问题,百度了一下找到答案,并顺利解决。代码号小编在这里做个记录 -
DEDE5.6升级dedecms5.7无法发布编辑文章的方法
DEDECMS5.6升级到5.7后导入老数据库数据无法发布编辑文章的解决办法此问题是从5.6升级到5.7再导入老数据库3表(附加表,主表,微表)后出的
留言与评论 (共有 条评论) |