V6.0手机版伪静态不生效,提示Error Loading
经过测试,受不同服务器软件版本、是否绑定二级域名等因素影响,不同服务器对规则的解析存在差异。以下为各服务器伪静态规则的两种写法,如果第一条写法不生效,试试第二条写法。
通常情况,第一种写法适合不绑定二级域名,第二种写法适合绑定二级域名。
手机版本属于特殊的独立站点,建议有条件的用户尽量绑定二级域名。
Apache
[*]RewriteRule ^(.*)/(+)-(+)-(+)-(+)\.html$ $1/index.php?moduleid=$2&catid=$3&itemid=$4&page=$5
复制代码
[*]RewriteRule ^(+)-(+)-(+)-(+)\.html$ index.php?moduleid=$1&catid=$2&itemid=$3&page=$4
复制代码
Nginx
[*]rewrite ^/(.*)/(+)-(+)-(+)-(+)\.html$ /$1/index.php?moduleid=$2&catid=$3&itemid=$4&page=$5 last;
复制代码
[*]rewrite ^/(+)-(+)-(+)-(+)\.html$ /index.php?moduleid=$1&catid=$2&itemid=$3&page=$4 last;
复制代码
IIS6
[*]RewriteRule ^(.*)/(+)-(+)-(+)-(+)\.html(\?(.*))*$ $1/index\.php\?moduleid=$2&catid=$3&itemid=$4&page=$5
复制代码
[*]RewriteRule ^(+)-(+)-(+)-(+)\.html(\?(.*))*$ index\.php\?moduleid=$1&catid=$2&itemid=$3&page=$4
复制代码
IIS7+
[*]<match url="^(.*)/(+)-(+)-(+)-(+)\.html\?*(.*)$" />
[*]<action type="Rewrite" url="{R:1}/index.php?moduleid={R:2}&catid={R:3}&itemid={R:4}&page={R:5}"/>
复制代码
[*]<match url="^(+)-(+)-(+)-(+)\.html\?*(.*)$" />
[*]<action type="Rewrite" url="index.php?moduleid={R:1}&catid={R:2}&itemid={R:3}&page={R:4}"/>
复制代码
Zeus
[*]match URL into $ with ^(.*)/(+)-(+)-(+)-(+)\.html$
[*]if matched then
[*]set URL = $1/index.php?moduleid=$2&catid=$3&itemid=$4&page=$5
[*]endif
复制代码
[*]match URL into $ with ^(+)-(+)-(+)-(+)\.html$
[*]if matched then
[*]set URL = index.php?moduleid=$1&catid=$2&itemid=$3&page=$4
[*]endif
复制代码
:victory: 不错不错
页:
[1]