I'm trying to redirect iPhone users going to my homepage to go to the mobile version unless they have a cookie to override that redirect. I'm close, but not quite there, and was hoping somebody might be able to help me identify what I'm doing wrong.
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} iPhone
RewriteCond %{HTTP_COOKIE} ^mobile=no$
RewriteRule ^$ /m/ [L]