discuz 2.5伪静态规则详解介绍
发布:smiling 来源: PHP粉丝网 添加日期:2014-12-06 16:14:12 浏览: 评论:0
本文章给各位朋友介绍关于discuz 2.5伪静态规则的在不同环境的写法,包括有nginx,httpd.ini(iis),httpd.conf,.htaccess的各种写法,各位朋友可参考.
Nginx伪静态规则,代码如下:
- rewrite ^([^.]*)/brand.html$ $1/plugin.php?id=sanree_brand last;
- rewrite ^([^.]*)/brand-index-(.+)-(.+)-(.+)-(.+).html$ $1/plugin.php?id=sanree_brand&mod=list&tid=$2&did=$3&filter=$4&listmode=$5 last;
- rewrite ^([^.]*)/brand-(.+)-(.+).html$ $1/plugin.php?id=sanree_brand&mod=$2&tid=$3 last;
- rewrite ^([^.]*)/b/(.+).html$ $1/plugin.php?id=sanree_brand&mod=brandno&tid=$2 last;
httpd.ini,代码如下:
- RewriteRule ^(.*)/brand.html(?(.*))*$ $1/plugin.php?id=sanree_brand&$3
- RewriteRule ^(.*)/brand-index-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html(?(.*))*$ $1/plugin.php?id=sanree_brand&mod=list&tid=$2&did=$3&filter=$4&listmode=$5&$6 //开源软件:phpfensi.com
- RewriteRule ^(.*)/brand-(.+)-([0-9]+).html(?(.*))*$ $1/plugin.php?id=sanree_brand&mod=$2&tid=$3&$5
- RewriteRule ^(.*)/b/([a-z0-9]+).html(?(.*))*$ $1/plugin.php?id=sanree_brand&mod=brandno&tid=$2&$4
.htaccess,代码如下:
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^brand.html$ plugin.php?id=sanree_brand&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^brand-index-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ plugin.php?id=sanree_brand&mod=list&tid=$1&did=$2&filter=$3&listmode=$4&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^brand-(.+)-([0-9]+).html$ plugin.php?id=sanree_brand&mod=$1&tid=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^b/([a-z0-9]+).html$ $1/plugin.php?id=sanree_brand&mod=brandno&tid=$1&%1
httpd.conf,代码如下:
- RewriteRule ^(.*)/brand.html?*(.*)$ $1/plugin.php?id=sanree_brand&$2
- RewriteRule ^(.*)/brand-index-(.+)-(.+)-(.+)-(.+).html?*(.*)$ $1/plugin.php?id=sanree_brand&mod=list&tid=$2&did=$3&filter=$4&listmode=$5&$6
- RewriteRule ^(.*)/brand-(.+)-(.+).html?*(.*)$ $1/plugin.php?id=sanree_brand&mod=$2&tid=$3&$5
- RewriteRule ^(.*)/b/(.+).html?*(.*)$ $1/plugin.php?id=sanree_brand
Tags: discuz静态规则 discuz伪静态
相关文章
- ·Discuz! 各个版本通用 Apache伪静态规则(2014-11-19)
- ·简单配置discuz x2.5伪静态规则(2014-12-05)
- ·discuz x1.5 伪静态的配置方法(iis,apache)(2015-03-25)
- ·Windows系统Apache服务器主机对discuz伪静态的设置(2015-09-30)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)