您现在的位置: 首页 > 新闻 > 建站常识

毕节destoon手机版伪静态设置方法

来源:毕节网络公司发布时间:2018-04-12热度:5439

destoon系统mobile目录已经内置.htaccess文件,如果服务器不支持.htaccess,需要手动设置伪静态规则。经过测试,受不同服务器软件版本、是否绑定二级域名等因素影响,不同服务器对规则的解析存在差异。以下为各服务器伪静态规则的两种写法,如果第一条写法不生效,试试第二条写法。

Apache

 

1.

RewriteRule ^(.*)/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/index.php?moduleid=$2&catid=$3&itemid=$4&page=$5

 

2.

RewriteRule ^([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ index.php?moduleid=$1&catid=$2&itemid=$3&page=$4

 

Nginx

1.

rewrite ^/(.*)/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /$1/index.php?moduleid=$2&catid=$3&itemid=$4&page=$5 last;

 

2.

rewrite ^/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /index.php?moduleid=$1&catid=$2&itemid=$3&page=$4 last;

 

IIS6

1.

RewriteRule ^(.*)/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/index\.php\?moduleid=$2&catid=$3&itemid=$4&page=$5

 

2.

RewriteRule ^([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ index\.php\?moduleid=$1&catid=$2&itemid=$3&page=$4

 

IIS7+

1.

<match url="^(.*)/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$" />

<action type="Rewrite" url="{R:1}/index.php?moduleid={R:2}&amp;catid={R:3}&amp;itemid={R:4}&amp;page={R:5}"/>

 

2.

<match url="^([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$" />

<action type="Rewrite" url="index.php?moduleid={R:1}&amp;catid={R:2}&amp;itemid={R:3}&amp;page={R:4}"/>

 

Zeus

1.

match URL into $ with ^(.*)/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$

if matched then 

set URL = $1/index.php?moduleid=$2&catid=$3&itemid=$4&page=$5

endif

 

2.

match URL into $ with ^([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$

if matched then 

set URL = index.php?moduleid=$1&catid=$2&itemid=$3&page=$4

endif

destoon手机版本属于特殊的独立站点,建议有条件的用户绑定二级域名。

本文来源:http://www.ycwebs.com/news/show-52.html