如修改默认伪静态规则名(pinche),以下静态链接里的 pinche也要进行相应修改。(等号右边动态mini_pinche不要改动)
例子:(把pinche改为 pc)
原句:RewriteRule ^pinche\.html$ plugin.php?id=mini_pinche:index
改后:RewriteRule ^pc\.html$ plugin.php?id=mini_pinche:index
-------------------------------------(修改默认伪静态规则名称功能,需1.4版以上才支持)----------------------------
Apache Web Server规则
#简易拼车- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche\.html$ plugin.php?id=mini_pinche:index
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)\.html$ plugin.php?id=mini_pinche:index&a=$1&b=$2&bc=$3&sc=$4&x=$5&e=$6&m=$7&c=$8&u=$9
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_z\.html$ plugin.php?id=mini_pinche:index&a=$1&b=$2&bc=$3&sc=$4&x=$5&e=$6&m=$7&c=$8&u=$9&zx=z
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche_([0-9]+)\.html$ plugin.php?id=mini_pinche:index&mod=view&sid=$1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche_user\.html$ plugin.php?id=mini_pinche:mini_pinche_user
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche_user_add\.html$ plugin.php?id=mini_pinche:mini_pinche_user&p=add
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche_user_add2\.html$ plugin.php?id=mini_pinche:mini_pinche_user&p=add2
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche_user_favorites\.html$ plugin.php?id=mini_pinche:mini_pinche_user&p=favorites
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche_user_myreservation\.html$ plugin.php?id=mini_pinche:mini_pinche_user&p=mydingwei
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^pinche_user_myinfo\.html$ plugin.php?id=mini_pinche:mini_pinche_user&p=userinfo
复制代码 #简易拼车
IIS6规则- RewriteRule ^(.*)/pinche\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:index
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_0\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=0
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_1\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=1
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_2\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=2
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_0_z\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=0&zx=z
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_1_z\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=1&zx=z
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_2_z\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=2&zx=z
- RewriteRule ^(.*)/pinche_([0-9]+)\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:index&mod=view&sid=$2
- RewriteRule ^(.*)/pinche_user\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:mini_pinche_user
- RewriteRule ^(.*)/pinche_user_add\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:mini_pinche_user&p=add
- RewriteRule ^(.*)/pinche_user_add2\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:mini_pinche_user&p=add2
- RewriteRule ^(.*)/pinche_user_favorites\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:mini_pinche_user&p=favorites
- RewriteRule ^(.*)/pinche_user_myreservation\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:mini_pinche_user&p=mydingwei
- RewriteRule ^(.*)/pinche_user_myinfo\.html\?*(.*)$ $1/plugin\.php\?id=mini_pinche:mini_pinche_user&p=userinfo
复制代码 IIS6(独立。如上面的IIS6规则没效,试试这个,加到httpd.conf)- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche\.html$ $1/plugin.php?id=mini_pinche:index
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_0\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=0
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_1\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_2\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=2
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_0_z\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=0&zx=z
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_1_z\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=1&zx=z
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_2_z\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=2&zx=z
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_([0-9]+)\.html$ $1/plugin.php?id=mini_pinche:index&mod=view&sid=$2
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_user\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_user_add\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=add
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_user_add2\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=add2
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_user_favorites\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=favorites
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_user_myreservation\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=mydingwei
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^(.*)/pinche_user_myinfo\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=userinfo
复制代码 IIS7规则- <rule name="minipinche1">
- <match url="^(.*/)*pinche.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:index" />
- </rule>
- <rule name="minipinche2">
- <match url="^(.*/)*pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_0.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:index&a={R:2}&b={R:3}&bc={R:4}&sc={R:5}&x={R:6}&e={R:7}&m={R:8}&c={R:9}&u=0" />
- </rule>
- <rule name="minipinche3">
- <match url="^(.*/)*pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_1.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:index&a={R:2}&b={R:3}&bc={R:4}&sc={R:5}&x={R:6}&e={R:7}&m={R:8}&c={R:9}&u=1" />
- </rule>
- <rule name="minipinche4">
- <match url="^(.*/)*pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_2.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:index&a={R:2}&b={R:3}&bc={R:4}&sc={R:5}&x={R:6}&e={R:7}&m={R:8}&c={R:9}&u=2" />
- </rule>
- <rule name="minipinche5">
- <match url="^(.*/)*pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_0_z.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:index&a={R:2}&b={R:3}&bc={R:4}&sc={R:5}&x={R:6}&e={R:7}&m={R:8}&c={R:9}&u=0&zx=z" />
- </rule>
- <rule name="minipinche6">
- <match url="^(.*/)*pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_1_z.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:index&a={R:2}&b={R:3}&bc={R:4}&sc={R:5}&x={R:6}&e={R:7}&m={R:8}&c={R:9}&u=1&zx=z" />
- </rule>
- <rule name="minipinche7">
- <match url="^(.*/)*pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_2_z.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:index&a={R:2}&b={R:3}&bc={R:4}&sc={R:5}&x={R:6}&e={R:7}&m={R:8}&c={R:9}&u=2&zx=z" />
- </rule>
- <rule name="minipinche8">
- <match url="^(.*/)*pinche_([0-9]+).html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:index&mod=view&sid={R:2}" />
- </rule>
- <rule name="minipinche9">
- <match url="^(.*/)*pinche_user.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:mini_pinche_user" />
- </rule>
- <rule name="minipinche10">
- <match url="^(.*/)*pinche_user_add.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:mini_pinche_user&p=add" />
- </rule>
- <rule name="minipinche11">
- <match url="^(.*/)*pinche_user_add2.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:mini_pinche_user&p=add2" />
- </rule>
- <rule name="minipinche12">
- <match url="^(.*/)*pinche_user_favorites.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:mini_pinche_user&p=favorites" />
- </rule>
- <rule name="minipinche13">
- <match url="^(.*/)*pinche_user_myreservation.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:mini_pinche_user&p=mydingwei" />
- </rule>
- <rule name="minipinche14">
- <match url="^(.*/)*pinche_user_myinfo.html\?*(.*)$" />
- <action type="Rewrite" url="{R:1}/plugin.php\?id=mini_pinche:mini_pinche_user&p=userinfo" />
- </rule>
复制代码 Nginx Web Server规则- rewrite ^([^\.]*)/pinche.html$ $1/plugin.php?id=mini_pinche:index last;
- rewrite ^([^\.]*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_0\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=0 last;
- rewrite ^([^\.]*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_1\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=1 last;
- rewrite ^([^\.]*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_2\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=2 last;
- rewrite ^([^\.]*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_0_z\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=0&zx=z last;
- rewrite ^([^\.]*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_1_z\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=1&zx=z last;
- rewrite ^([^\.]*)/pinche_list_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_2_z\.html$ $1/plugin.php?id=mini_pinche:index&a=$2&b=$3&bc=$4&sc=$5&x=$6&e=$7&m=$8&c=$9&u=2&zx=z last;
- rewrite ^([^\.]*)/pinche_([0-9]+)\.html$ $1/plugin.php?id=mini_pinche:index&mod=view&sid=$2 last;
- rewrite ^([^\.]*)/pinche_user\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user last;
- rewrite ^([^\.]*)/pinche_user_add\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=add last;
- rewrite ^([^\.]*)/pinche_user_add2\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=add2 last;
- rewrite ^([^\.]*)/pinche_user_favorites\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=favorites last;
- rewrite ^([^\.]*)/pinche_user_myreservation\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=mydingwei last;
- rewrite ^([^\.]*)/pinche_user_myinfo\.html$ $1/plugin.php?id=mini_pinche:mini_pinche_user&p=userinfo last;
复制代码 |