How to redirect mobile devices to mobile website?

jackson

Does anyone know a good guide for how to detect and redirect website visitors that are using mobile devices/browsers?

Answer this Question

Answers

3 total
Christopher Nerney
Vote Up (11)

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.

 


 

 

jimlynch
Vote Up (10)

If you're using WordPress, try the Jetpack plugin. That comes with a free mobile version that you can enable. Anybody on a phone will see the mobile version automatically.

http://wordpress.org/extend/plugins/jetpack/

Ask a question

Join Now or Sign In to ask a question.
The space agency has published a catalog of its software being made available to the public, and it includes code for things other than flying a rocket to the moon
Microsoft pays some companies to produce Windows 8 versions of their products. Without this type of financial assistance, or various other incentives, is Windows 8 and especially Windows Phone development worth the effort?
In today's accessible technology roundup: UK researchers find Google Glass helps Parkinson’s sufferers, a new wheelchair that can be controlled with facial expressions and a guide for using text alternatives to images on websites
Ever wish you could get your hands on the software that NASA used to launch its Apollo lunar missions or to get robots working on Mars? If so, NASA has something for you.
Story mapping offers a visualization of the steps, or stories, which make up a software development project. This conversation with several experts on the topic discusses how story mapping works, how maps are created and how stakeholders benefit from seeing the lay of the land.
In today's accessible technology roundup: The impact of ARIA on screen reader developers, Quail could be threatened by software patents and how to choose an accessible color palette
An argument between developers of some of the most basic parts of Linux turned heated this week, resulting in a prominent Red Hat employee and code contributor being banned from working on the Linux kernel.
A new study of the questions asked on Stack Exchange reveals what issues are giving web developers headaches
Based on the expected annual return, computer science degrees from state universities pay off better than those from private schools
In today's accessible technology roundup: A new group for accessible technology professionals is formed, Texas middle schoolers design an app for the blind to navigate indoor spaces and web developers are warned against relying too much on ARIA