How to redirect mobile devices to mobile website?

Answer

Christopher Nerney
Vote Up (12)

This one, from InMotionHosting.com, covers several options:

 

To redirect a mobile visitor, you'll need to determine if their browser is a web browser on a mobile device or not. You can determine which browser the visitor is using. ...

 

If you are running a Content Management System (such as WordPress or Joomla), there may be plugins already available that help with handling mobile visitors. ...

 

Because mobile phones typically have a small screen width, you can redirect visitors to your mobile site if they have a screen width of less than or equal to 800 pixels. Place Javascript window.location code in the head section of your main website code. That way when your site is visited, the javascript will see the browser width and redirect to the appropriate site. ...

 

You can use a .htaccess redirect to transfer visitors based upon the MIME types the browser supports. For example, if the user's browser accepts mime types that include WML (Wireless Markup Language), then most likely it is a mobile device. The code below should be placed in your .htaccess file.

 


 

 

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question