Detect Mobile
Detect Mobile Phone Browser Examples
General Redirection
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/mobile_directory/.*$
RewriteCond %{HTTP_USER_AGENT} (Blackberry|Android|Mobile1|Mobile3|etc)
RewriteRule ^(.*)$ /mobile_directory/$1
Redirect to mobile domain name
RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$
RewriteRule ^(.*)$ http://iphone.yourdomain.com$1 [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$
RewriteRule ^(.*)$ http://bb.yourdomain.com$1 [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*Android.*$
RewriteRule ^(.*)$ http://android.yourdomain.com$1 [R=301]