我的手机版绑定了二级域名首页注册内页全部都是404
我的网站绑定了二级域名首页可以正常打开但是只要点开内容就提示404了。不使用二级域名一切正常什么问题高人指教下?m.cnfruit.org大家帮看看什么情况呀。是伪静态规则的问题么?问题解决了 其实很简单就是把官方的.htaccess的复制到MOBILE目录下一份,我的网站是使用的二级域名的手机版所以还需要在在.htaccess文件里面添加一句
RewriteRule ^(+)-(+)-(+)-(+)\.html$ index.php?moduleid=$1&catid=$2&itemid=$3&page=$4
这个是绑定二级域名的如果不绑定二级域名添加这个RewriteRule ^(.*)/(+)-(+)-(+)-(+)\.html$ $1/index.php?moduleid=$2&catid=$3&itemid=$4&page=$5
就行的以上的都是Apache的更多的可以参考官方的说明地址http://bbs.destoon.com/thread-70821-1-1.html
我把内容复制在下面了
经过测试,受不同服务器软件版本、是否绑定二级域名等因素影响,不同服务器对规则的解析存在差异。
以下为各服务器伪静态规则的两种写法,如果第一条写法不生效,试试第二条写法。
通常情况,第一种写法适合不绑定二级域名,第二种写法适合绑定二级域名。
手机版本属于特殊的独立站点,建议有条件的用户尽量绑定二级域名。
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+
复制代码
复制代码
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
复制代码
学习一下
学习了,
http://bbs.destoon.com/static/image/smiley/default/victory.gif
http://bbs.destoon.com/static/image/smiley/default/victory.gif
http://bbs.destoon.com/static/image/smiley/default/victory.gif
页:
[1]