推荐!各类建站程序伪静态规则代码(2)

rewrite “^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$” /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last; 

rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$” /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last; 

rewrite “^/exchange-([0-9]+)-([0-9]+)(.*).html$” /exchange.php?cat_id=$1&page=$2 last; 

rewrite “^/exchange-([0-9]+)(.*).html$” /exchange.php?cat_id=$1 last; 

SHOPEX伪静态化rewrite规则

location / { 

if (!-e $request_filename) { 

rewrite ^/(.+.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last; 

         } 

Discuz 7伪静态化rewrite规则

rewrite ^/archiver/((fid|tid)-[w-]+.html)$ /archiver/index.php?$1 last; 

rewrite ^/forum-([0-9]+)-([0-9]+).html$ /forumdisplay.php?fid=$1&page=$2 last; 

rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ /viewthread.php?tid=$1&extra=page=$3&page=$2 last; 

rewrite ^/space-(username|uid)-(.+).html$ /space.php?$1=$2 last; 

rewrite ^/tag-(.+).html$ /tag.php?name=$1 last; 

discuzX2.0伪静态化rewrite规则

# 将 RewriteEngine 模式打开 

 

RewriteEngine On 

 

# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将  

 

/discuz 修改为 / 

 

RewriteBase / 

 

# 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=$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&$1=$2&%1 

RewriteCond %{QUERY_STRING} ^(.*)$ 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/9512d7475b1c61962137f6ce44c34022.html