Apache - Htaccess mobile redirect, Redirect to mobile page

Htaccess mobile redirect


How to identify the mobile device using htaccess?
The mobile device can be identified by using HTTP_USER_AGENT, once the device is identified then it can redirected to a different page which is compatible to mobile device.

RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]    
RewriteRule ^$ http://mobile.MYDOMAIN.com/ [L,R=302]                               


RewriteCond %{HTTP_USER_AGENT} "!(android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos)" [NC] 
RewriteRule ^$ http://www.w3calculator.com/ [L,R=302]                               

The topic on Apache - Htaccess mobile redirect is posted by - Math

Hope you have enjoyed, Apache - Htaccess mobile redirectThanks for your time

Tech Bluff