I want to check if user is using mobile device or regular system and redirect him to either mobile or normal site using apache. Is this possible?
I tried code like
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteRule ^$ http://m.example.com/ [L,R=302]
</IfModule>
in .htacess and it did not have any effect. Is this correct ?
Firstly, how are you testing this?
Secondly, try the following RewriteRule instead of the one you are using.
Finally, as an extra piece of advice, i would also consider the following: