帝国教程

帝国CMS技巧:实现WAP二级访问

来源:帝国CMS模板网 作者:凉人心 时间:2026-07-08
浏览:22 收藏 点赞(0)
简介:这个方法,同样可以实现E/WAP/的二级域名访问。 具体如下: RewriteEngine on # 把 m.daixiao360.cn改为你要绑定的域名. RewriteCond %{HTTP_HOST} ^(www.)?m.daixiao360.cn$ # 把 /e/wap/改为要绑定的目录. RewriteCond %{REQUEST_URI} !^/e/wap/ # 不要改以下两行. Rewrite

这个方法,同样可以实现E/WAP/的二级域名访问。

具体如下:

RewriteEngine on
# 把 m.daixiao360.cn改为你要绑定的域名.
RewriteCond %{HTTP_HOST} ^(www.)?m.daixiao360.cn$
# 把 /e/wap/改为要绑定的目录.
RewriteCond %{REQUEST_URI} !^/e/wap/
# 不要改以下两行.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# 把 /e/wap/改为要绑定的目录.
RewriteRule ^(.*)$ /e/wap/$1
# 把 m.daixiao360.cn改为你要绑定的域名
# 把 /e/wap/ 改为要绑定的目录.
# /e/wap/ 后面是首页文件index.php, index.html……
RewriteCond %{HTTP_HOST} ^(www.)?m.daixiao360.cn$
RewriteRule ^(/)?$ /e/wap/index.php [L]

就可以解决二级域名访问WAP功能了。

在线
客服