0
移動設備重定向到域/ m/request_uri,但如果你把該URL放在桌面上,它應該重定向到domain/request_uri。htaccess重定向工作到移動,但不是到桌面
有什麼建議嗎?謝謝!
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/(fb/)?(takeaction|\d{1,3})/.*$
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ /m/$1 [L,R=302]
RewriteCond %{REQUEST_URI} ^/m/(takeaction|\d{1,3})/.*$
RewriteCond %{HTTP_USER_AGENT} "!(android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile)" [NC]
RewriteRule ^/m/(.*)$ /$1 [L,R=302]
有什麼問題?你有錯誤嗎?你對某個網址期待的結果是什麼?你取而代之的是什麼? – 2012-08-10 18:35:52
這根本就沒有重定向。我設法得到這個重定向到根,所以RewriteCond線似乎工作,但我認爲我的問題是與RewriteRule沒有改變「domain.com/m/request」爲「domain.com/request」 – 2012-08-10 18:37:30