jeudi 28 juillet 2016

Iphone user agent redirection not working

I am using below code to redirect to my mobile website in .htaccess file:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{REQUEST_URI} !^/mobile/
RewriteCond %{REQUEST_URI} !^/index.php/
RewriteRule ^(.*)$ /mobile/mysite/www/#/$1 [L,R=301,NE]

Its wworking fine with android. The site gets redirected correctly. However, when I test it on iphone, I get redirect too many times error.

What's causing the issue here?

Aucun commentaire:

Enregistrer un commentaire