2
電話機から、website.com
にアクセスしようとすると、mobile.website.com
にリダイレクトされます。ただし、mobile.website.com
はwebsite.com
にAJAXリクエストを行いますので、すべてのリクエストはwebsite.com/m/...
になります。これは動作していない:htaccess RewriteCondはwebsite/m/...のリクエストをそのままにします。
# redirect phones/tablets to mobile site
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{HTTP_HOST} !mobile\.website\.com [NC]
RewriteCond %{REQUEST_URI} !^/m/ [NC]
RewriteRule ^(.*)$ http://www.mobile.website.com/$1 [L,R=302]
具体行:URLがwebsite.com/m/...
と一致した場合に
RewriteCond %{REQUEST_URI} !^/m/ [NC]
それは書き換えルールをキャンセルしなければなりません。何か案は?
ありがとうございます!これはまだ、あなたのApacheのaccess.log
とerror.log
からマッチした行を投稿してください動作しない場合も
# redirect phones/tablets to mobile site
RewriteCond %{HTTP_USER_AGENT} (android|blackberry|ipad|iphone|ipod|iemobile|opera [NC]mobile|palmos|webos|googlebot-mobile) [NC]
RewriteCond %{HTTP_HOST} !mobile\.website\.com$ [NC]
RewriteRule ^(?!m/).*$ http://www.mobile.website.com%{REQUEST_URI} [L,R,NC]
: