用QQ帐号登录应用中心QQ登录
Discuz! 应用中心

专题聚合伪静态规则

如不知道自己使用的是哪种静态规则或不知道怎么添加,请咨询您的空间商。
也可以参考你的规则文件里的规则写法,使用对应的规则
如有错误,请联系QQ客服(不在线先留言,并先离线发送您的规则文件过来)。
添加规则后没生效,可尝试重启服务器。


Apache Web Server规则

RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^special\.html$ plugin.php?id=xlwsq_zt
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)\.html$ plugin.php?id=xlwsq_zt:xlwsq_zt&a=$1&b=$2&m=$3&n=$4
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)\.html$ plugin.php?id=xlwsq_zt:xlwsq_zt&a=$1&b=$2&m=$3&n=$4&page=$5
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_tj\.html$ plugin.php?id=xlwsq_zt&a=$1&b=$2&m=$3&n=$4&tj=t
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_top\.html$ plugin.php?id=xlwsq_zt&a=$1&b=$2&m=$3&n=$4&top=top
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^special_([0-9]+)\.html$ plugin.php?id=xlwsq_zt&mod=view&sid=$1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^special_user\.html$ plugin.php?id=xlwsq_zt:xlwsq_zt_user
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^special_user_add\.html$ plugin.php?id=xlwsq_zt:xlwsq_zt_user&p=add




IIS Web Server规则 iis6  (添加后,重启下IIS)

RewriteRule ^(.*)/special\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_zt
RewriteRule ^(.*)/special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_zt:xlwsq_zt&a=$2&b=$3&m=$4&n=$5
RewriteRule ^(.*)/special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_tj\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_zt:xlwsq_zt&a=$2&b=$3&m=$4&n=$5&tj=t
RewriteRule ^(.*)/special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_top\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_zt:xlwsq_zt&a=$2&b=$3&m=$4&n=$5&top=top
RewriteRule ^(.*)/special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_zt:xlwsq_zt&a=$2&b=$3&m=$4&n=$5&page=$6
RewriteRule ^(.*)/special_([0-9]+)\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_zt&mod=view&sid=$2
RewriteRule ^(.*)/special_user\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_zt:xlwsq_zt_user
RewriteRule ^(.*)/special_user_add\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_zt:xlwsq_zt_user&p=add



IIS7规则  (添加后,重启下IIS)

<rule name=\"special1\">
<match url=\"^(.*/)*special.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_zt\" />
</rule>
<rule name=\"special2\">
<match url=\"^(.*/)*special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+).html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_zt:xlwsq_zt&amp;a={R:2}&amp;b={R:3}&amp;m={R:4}&amp;n={R:5}\" />
</rule>
<rule name=\"special3\">
<match url=\"^(.*/)*special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_tj.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_zt:xlwsq_zt&amp;a={R:2}&amp;b={R:3}&amp;m={R:4}&amp;n={R:5}&amp;tj=t\" />
</rule>
<rule name=\"special4\">
<match url=\"^(.*/)*special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_top.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_zt:xlwsq_zt&amp;a={R:2}&amp;b={R:3}&amp;m={R:4}&amp;n={R:5}&amp;top=top\" />
</rule>
<rule name=\"special5\">
<match url=\"^(.*/)*special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+).html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_zt:xlwsq_zt&amp;a={R:2}&amp;b={R:3}&amp;m={R:4}&amp;n={R:5}&amp;page={R:6}\" />
</rule>
<rule name=\"special6\">
<match url=\"^(.*/)*special_([0-9]+).html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_zt&amp;mod=view&amp;sid={R:2}\" />
</rule>
<rule name=\"special7\">
<match url=\"^(.*/)*special_user.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_zt:xlwsq_zt_user\" />
</rule>
<rule name=\"special8\">
<match url=\"^(.*/)*special_user_add.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_zt:xlwsq_zt_user&amp;p=add\" />
</rule>



Nginx Web Server规则

rewrite ^([^\.]*)/special.html$ $1/plugin.php?id=xlwsq_zt last;
rewrite ^([^\.]*)/special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)\.html$ $1/plugin.php?id=xlwsq_zt:xlwsq_zt&a=$2&b=$3&m=$4&n=$5 last;
rewrite ^([^\.]*)/special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_tj\.html$ $1/plugin.php?id=xlwsq_zt:xlwsq_zt&a=$2&b=$3&m=$4&n=$5&tj=t last;
rewrite ^([^\.]*)/special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_top\.html$ $1/plugin.php?id=xlwsq_zt:xlwsq_zt&a=$2&b=$3&m=$4&n=$5&top=top last;
rewrite ^([^\.]*)/special_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)\.html$ $1/plugin.php?id=xlwsq_zt:xlwsq_zt&a=$2&b=$3&m=$4&n=$5&page=$6 last;
rewrite ^([^\.]*)/special_([0-9]+)\.html$ $1/plugin.php?id=xlwsq_zt&mod=view&sid=$2 last;
rewrite ^([^\.]*)/special_user\.html$ $1/plugin.php?id=xlwsq_zt:xlwsq_zt_user last;
rewrite ^([^\.]*)/special_user_add\.html$ $1/plugin.php?id=xlwsq_zt:xlwsq_zt_user&p=add last;



如修改默认伪静态规则名(special),以下静态链接里的 special 也要进行相应修改。(等号右边动态xlwsq_zt不要改动)
例子:(把special改为 zhuanti)
原句:RewriteRule ^special\.html$ plugin.php?id=xlwsq_zt
改后:RewriteRule ^zhuanti\.html$ plugin.php?id=xlwsq_zt

修改的名称,请勿和其它规则名称冲突。

Discuz!交流社区 | Discuz!程序下载 | Discuz!使用教程 | 我是Discuz!开发者 | 我是Discuz!分销商

Copyright ©2024Dismall.comAll Rights Reserved. 皖ICP备16010102号-4 增值电信业务经营许可证:皖B2-20200047

违法网站请勿向我司工作人员及应用开发者发起任何形式的服务请求,严禁使用Discuz!应用中心提供的应用从事任何非法活动

应用中心客服80056365 应用中心客服微信扫一扫 有偿服务客服1453650 有偿服务客服微信扫一扫

  应用中心操作、授权恢复等使用问题,联系应用中心客服|Discuz! 安装、升级、问题排查、定制,联系有偿服务客服

返回顶部