Here's a simplified RewiteRule that combines mobile user agents into one condition:
# Redirect Mobile Devices RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile" [NC] RewriteRule ^(.*)$ http://m.example.com/$1 [R=301,L]
You will notice that the [NC] nocase flag is set , which causes the RewriteRule to match case-insensitively.
That is, it does not matter whether user agent strings are displayed as uppercase, camel, or lowercase in a consistent URI. (e.g. IPHONE vs iPhone vs iphone).
source share