I’ve a webapp at http://www.mysite.com/myapp/ and I’d like to redirect users visiting my app from iPhone to http://www.mysite.com/myapp/i/ using an .htaccess file in /myapp folder.
What I’ve tried so far is:
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} iPhone
RewriteCond %{REQUEST_URI} !^/myapp/
RewriteRule .* /myapp/i/ [R]
It enters an infinite redirecting loop…
I understand that the problem is that the condition is verified after the redirect too, but I can’t solve the problem…
Any help? Thanks guys…
This code in the .htaccess in the myapp folder is working perfectly…
All other answers didn’t work for me…
Thanks anyway guys!