webserver

How to I redirect mobile users to my mobile specific site or page?

If you’re running an Apache webserver, a redirect like this should do the trick:

RewriteCond %{HTTP_USER_AGENT} “Windows CE” [NC,OR] #Windows CE and Pocket PC
RewriteCond %{HTTP_USER_AGENT} “NetFront” [NC,OR] #PalmSource WebBrowser 2.0
RewriteCond %{HTTP_USER_AGENT} “Palm OS” [NC,OR] #Eudora Web Browser for Palm
RewriteCond %{HTTP_USER_AGENT} “Blazer” [NC,OR] #Handspring Blazer Browser
RewriteCond %{HTTP_USER_AGENT} “Elaine” [NC,OR] #RIM Devices
RewriteCond %{HTTP_USER_AGENT} “^WAP.*$” [NC,OR] #WAP Browsers
RewriteCond %{HTTP_USER_AGENT} “Plucker” [NC,OR] #Plucker Offline download client
RewriteCond %{HTTP_USER_AGENT} “AvantGo” [NC] #AvantGo Service
RewriteRule ^index.php http://www.yoursite.com/pda.php [L,R]

It will redirect users using any of the browsers listed above to http://www.yoursite.com/pda.php.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top