I am trying to creat a mobile friendly version of my site. Hiow do I detect and redirect visitors to my website using cellphones and mobile devices to my phone friendly website version?
You ca do this by modifying .htaccess file. Add following codes in it RewriteEngine on RewriteCond %{HTTP_USER_AGENT} "Windows CE" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "NetFront" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "Palm OS" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "Blazer" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "Elaine" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "^WAP.*$" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "Plucker" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "vodafone" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "iPhone" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "nokia" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "symbian" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "Opera Mini" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "BlackBerry" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "j2me" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "midp" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "htc" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "java" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "sony" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "android" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "AvantGo" [NC] RewriteRule (.*) http://m.mysite.com [R,L]
Hey thanks guys for all the help, I'm still working on it, but the nput has been beneficial. Pos rep for all!