Hi there, I'm trying to rewrite some parametes in case the request had came from a Iphone device. Like this: www.mysite.com/javaaplication/p.do?url=pg if the user-agent have "Iphone" or "Ipod", rewrites to: www.mysite.com/javaaplication/p.do?url=pg_iphone RewriteCond %{HTTP_USER_AGENT} .*?iPod.*?$ [OR] RewriteCond %{HTTP_USER_AGENT} .*?iPhone.*?$ RewriteRule url=pg$ url=pg_iphone [R] ---> does'nt work Could some one help me!?!? thanks
try this RewriteCond %{HTTP_USER_AGENT} ^(.*)ipod(.*)$ [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^(.*)iphone(.*)$ [NC] RewriteCond %{THE_REQUEST} /(p\.do)\?url=pg\ HTTP/ RewriteRule ^(p\.do)?$ http://www.mysite.com/javaaplication/p.do?url=pg_iphone? [R=301,L] Code (markup):