If you can please give us details and a URL, then we can investigate further. I think what you're saying is have a main index page that provides a link to either the desktop or mobile version of the site, and then on both versions of the site include in the menu the ability to jump to the alternative version? The javascript is provided in the section above labeled Javascript window.location Method.If you have any further questions or comments, please let us know. That definitely would be an option, but in the context of this article wouldn't handle the automatic mobile redirection of your visitors via either Java Script or .htaccess. If you have any further questions, feel free to post them below.

updating iweb 1 1 2 templates to 2 0-12

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: Rewrite Engine On # Check for mime types commonly accepted by mobile devices Rewrite Cond % "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\ xml" [NC] Rewrite Cond % ^/$ Rewrite Rule ^ [R, L] You have just saved my life. It would be a bit tricky to handle a redirection back to the full desktop view of the website.

While testing this on a SAMSUNG smart phone, the screen resolution varied based upon how the phone was held.

To get the best results, you may have to test with various smart phones.

You can determine which browser the visitor is using.

You can also look at other things such as their screen resolution and whether they accept file types that are common to mobile devices.

Check it out with Google's mobile friendly test tool. Google provides a lot information that would helpful in your efforts to make your site more mobile friendly. Why not have the mobile version as the default and redirect desktop visitors to a desktop version.

Its unlikely that desktop users would want to view the site as a mobile device. only problem is my link back the main site using the ? Hello Gobi Jmp, Sorry for the problem with the code.

Kindest Regards, Scott MWhen linking back the main site using the ? Once I am on the main site any link will redirect back to M. Like a frustrating loop or a peice of gum that keeps moving from finger to thumb, when trying to flick it off. I use the robot txt file to tell search engines NOT to index. This would make it easy to deal with the loop issue, while still having a main site that is indexed and a mobile site (m.example.com), that will also get indexed.