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

伪静态规则

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

添加规则后没生效,可尝试重启服务器。

Apache Web Server规则
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tel\.html$ plugin.php?id=xlwsq_tel
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tel_list_([0-9]+)_([0-9]+)\.html$ plugin.php?id=xlwsq_tel&a=$1&b=$2
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tel_list_([0-9]+)_([0-9]+)_cy\.html$ plugin.php?id=xlwsq_tel&a=$1&b=$2&cy=cy
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tel_list_([0-9]+)_([0-9]+)_([0-9]+)\.html$ plugin.php?id=xlwsq_tel&a=$1&b=$2&page=$3
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tel_([0-9]+)\.html$ plugin.php?id=xlwsq_tel&mod=view2&sid=$1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tel_user\.html$ plugin.php?id=xlwsq_tel:xlwsq_tel_user
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tel_user_add\.html$ plugin.php?id=xlwsq_tel:xlwsq_tel_user&p=add
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tel_user_favorites\.html$ plugin.php?id=xlwsq_tel:xlwsq_tel_user&p=favorites



IIS Web Server规则 iis6 (添加后,重启下IIS)
RewriteRule ^(.*)/tel\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_tel
RewriteRule ^(.*)/tel_list_([0-9]+)_([0-9]+)\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_tel&a=$2&b=$3
RewriteRule ^(.*)/tel_list_([0-9]+)_([0-9]+)_cy\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_tel&a=$2&b=$3&cy=cy
RewriteRule ^(.*)/tel_list_([0-9]+)_([0-9]+)_([0-9]+)\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_tel&a=$2&b=$3&page=$6
RewriteRule ^(.*)/tel_([0-9]+)\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_tel&mod=view2&sid=$2
RewriteRule ^(.*)/tel_user\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_tel:xlwsq_tel_user
RewriteRule ^(.*)/tel_user_add\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_tel:xlwsq_tel_user&p=add
RewriteRule ^(.*)/tel_user_favorites\.html\?*(.*)$ $1/plugin\.php\?id=xlwsq_tel:xlwsq_tel_user&p=favorites



Nginx Web Server规则
rewrite ^([^\.]*)/tel.html$ $1/plugin.php?id=xlwsq_tel last;
rewrite ^([^\.]*)/tel_list_([0-9]+)_([0-9]+)\.html$ $1/plugin.php?id=xlwsq_tel:xlwsq_tel&a=$2&b=$3 last;
rewrite ^([^\.]*)/tel_list_([0-9]+)_([0-9]+)_cy\.html$ $1/plugin.php?id=xlwsq_tel:xlwsq_tel&a=$2&b=$3&cy=cy last;
rewrite ^([^\.]*)/tel_list_([0-9]+)_([0-9]+)_([0-9]+)\.html$ $1/plugin.php?id=xlwsq_tel:xlwsq_tel&a=$2&b=$3&page=$4 last;
rewrite ^([^\.]*)/tel_([0-9]+)\.html$ $1/plugin.php?id=xlwsq_tel:xlwsq_tel&mod=view2&sid=$2 last;
rewrite ^([^\.]*)/tel_user\.html$ $1/plugin.php?id=xlwsq_tel:xlwsq_tel_user last;
rewrite ^([^\.]*)/tel_user_add\.html$ $1/plugin.php?id=xlwsq_tel:xlwsq_tel_user&p=add last;
rewrite ^([^\.]*)/tel_user_favorites\.html$ $1/plugin.php?id=xlwsq_tel:xlwsq_tel_user&p=favorites last;


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

<rule name=\"xlwsqtel1\">
<match url=\"^(.*/)*tel.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_tel\" />
</rule>
<rule name=\"xlwsqtel2\">
<match url=\"^(.*/)*tel_list_([0-9]+)_([0-9]+).html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_tel&amp;a={R:2}&amp;b={R:3}\" />
</rule>
<rule name=\"xlwsqtel3\">
<match url=\"^(.*/)*tel_list_([0-9]+)_([0-9]+)_cy.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_tel&amp;a={R:2}&amp;b={R:3}&amp;cy=cy\" />
</rule>
<rule name=\"xlwsqtel4\">
<match url=\"^(.*/)*tel_list_([0-9]+)_([0-9]+)_([0-9]+).html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_tel&amp;a={R:2}&amp;b={R:3}&amp;page={R:4}\" />
</rule>
<rule name=\"xlwsqtel5\">
<match url=\"^(.*/)*tel_user.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_tel:xlwsq_tel_user\" />
</rule>
<rule name=\"xlwsqtel6\">
<match url=\"^(.*/)*tel_user_add.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_tel:xlwsq_tel_user&amp;p=add\" />
</rule>
<rule name=\"xlwsqtel7\">
<match url=\"^(.*/)*tel_user_favorites.html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_tel:xlwsq_tel_user&amp;p=favorites\" />
</rule>
<rule name=\"xlwsqtel8\">
<match url=\"^(.*/)*tel_([0-9]+).html\?*(.*)$\" />
<action type=\"Rewrite\" url=\"{R:1}/plugin.php\?id=xlwsq_tel&amp;mod=view2&amp;sid={R:2}\" />
</rule>


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

提醒:修改的名称,不要和其它规则相同

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

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

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

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

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

返回顶部