一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

discuz 2.5伪静态规则详解介绍

时间:2022-06-25 16:33:19 编辑:袖梨 来源:一聚教程网

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
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

热门栏目