Discuz论坛URL静态化规则urlrewrite
发布:smiling 来源: PHP粉丝网 添加日期:2014-12-06 16:12:51 浏览: 评论:0
Discuz的伪静态规则官方都为我们提供了,下面我来给大家收集了在apache,iis各版本之间的伪静态规则,有需要了解的朋友可参考.
apache伪静态规则,代码如下:
- # 将 RewriteEngine 模式打开
- RewriteEngine On
- # 修改以下语句中的 /bbs 为你的论坛目录地址,如果程序放在根目录中,请将 /bbs 修改为 /
- RewriteBase /bbs
- # Rewrite 系统规则请勿修改
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^topic-(.+).html$ portal.php?mod=topic&topic=$1&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^article-([0-9]+)-([0-9]+).html$ portal.php?mod=view&aid=$1&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^forum-(w+)-([0-9]+).html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+).html$ forum.php?mod=viewthread&tid=$1&extra=page%3D$3&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^group-([0-9]+)-([0-9]+).html$ forum.php?mod=group&fid=$1&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^space-(username|uid)-(.+).html$ home.php?mod=space&do=index&view=admin&$1=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^blog-([0-9]+)-([0-9]+).html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^archiver/(fid|tid)-([0-9]+).html$ archiver/index.php?action=$1&value=$2&%1
IIS6/IIS7.5 URL 静态化,代码如下:
- [ISAPI_Rewrite]
- # 3600 = 1 hour
- CacheClockRate 3600
- RepeatLimit 32
- # Protect httpd.ini and httpd.parse.errors files
- # from accessing through HTTP
- RewriteRule ^(.*)/topic-(.+).html?*(.*)$ $1/portal.php?mod=topic&topic=$2&$3
- RewriteRule ^(.*)/article-([0-9]+).html?*(.*)$ $1/portal.php?mod=view&aid=$2&$3
- RewriteRule ^(.*)/forum-(w+)-([0-9]+).html?*(.*)$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4
- RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html?*(.*)$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3&$5
- RewriteRule ^(.*)/group-([0-9]+)-([0-9]+).html?*(.*)$ $1/forum.php?mod=group&fid=$2&page=$3&$4 //开源软件:phpfensi.com
- RewriteRule ^(.*)/space-(username|uid)-(.+).html?*(.*)$ $1/home.php?mod=space&$2=$3&$4
- RewriteRule ^(.*)/([a-z]+)-(.+).html?*(.*)$ $1/$2.php?rewrite=$3&$4
Tags: Discuz论坛静态 urlrewrite
相关文章
- ·discuz论坛换新模板以后伪静态链接失效的问题(2015-09-30)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)