Hi everybody. I was trying this: Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$ RewriteRule ^(.*)$ http://frenchmaid.com/a.html [R=301] Code (markup): to redirect iphone users, but the rewrite rule didnt work. RewriteRule ^(.*)$ http://mobile.frenchmaid.com [R=301] Code (markup): on the other hand DOES work. Does my provider block something or is the first example simply wrong? THanx and regards Martin
First thing I always do when in doubt, is comment out my RewriteCond and append the variable I'm working with to a rewritten URL to take a look. RewriteRule ^(.*)$ http://frenchmaid.com/a.html?ua=%{HTTP_USER_AGENT} Code (markup): I'd simplify my pattern and remove the ^.* and .*$, but other than that it looks like it should work. It wouldn't have anything to do with your second example pointing to a different destination than the first, would it ?
Thanx for the tip ( commenting out stuff ) I simplfied it down and then found out that my server was blocking rewrite commands. Switched servers an now it works.