【发布时间】:2013-08-17 02:35:46
【问题描述】:
我成功地设置了基于设备的移动重定向目录,但客户想要一个返回完整站点的链接。
RewriteEngine on
Options +FollowSymlinks -MultiViews
RewriteBase /
RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteCond %{REQUEST_URI} !^/mobile/.*$
RewriteCond %{HTTP_USER_AGENT} **{mobile dectection code I removed for this post}**
RewriteRule ^(.*)$ /mobile/ [L,R=302]
我将一个.htaccess 文件与rewritengine off 放到移动网站的目录中。
知道当移动网站和主网站都使用同一个域时使用什么重写条件?或者,如果我为移动网站创建一个单独的域,这会更容易吗?
【问题讨论】: