background preloader

REDIRECT TO MOBILE

Facebook Twitter

Sebarmeli/JS-Redirection-Mobile-Site - GitHub. Redirect Mobile Devices. How to Redirect Mobile Phones and Handhelds to Your Mobile Website  (Written by Ross Dunn ) If you took the time to create a mobile website you now have to redirect mobile users from the full screen (regular) website to the mobile website seamlessly.

How to Redirect Mobile Phones and Handhelds to Your Mobile Website 

The following are some popular techniques I found while researching my article “How to Create a Free Mobile Website“. IMPORTANT: Redirects are a critical step in ensuring your website is search engine friendly. That said, there are over 120 elements that also contribute to maximum search engine friendliness. These elements are discovered by conducting an effective SEO Website Audit. About StepForth: We have been helping clients improve their online visibility through this service since 1997; our clients love our work.

How to Redirect Mobile Traffic Using PHP Mobile Browser Detection REQUIREMENT: This script will not work unless your page extensions are .php and your hosting account supports PHP. INSTRUCTIONS: Download this text file that has the code required. $mobile = " PHP Code to Redirect Mobile/Handheld Users. With the amount of people walking around using iPhones or some sort of Blackberry or PDA, it makes sense to provide an alternative landing page for Mobile/Handheld users that is formatted for their device.

PHP Code to Redirect Mobile/Handheld Users

I was recently hired to create a mobile page by a client and found a great piece of code to help with the whole redirection issue. The folks over at Detect Mobile Browsers have developed a great tool that checked to see if a user has reached your site through a Mobile/Handheld device, and if so will redirect to the page your choice. Just download the code off of their site and use their handy Function Generator to configure it how you want.

To configured it to treat everything as a Mobile/Handheld device use this code. To add an if statement to only make it redirect if it is the home page use this. Add this to the top of your header.php file and uploaded their mobile_device_detect.php file to your main directory. NOTE: This will only work if your site is built with PHP. How to redirect your site to a mobile version through JavaScript « Sebastiano Armeli's Tech Blog. The user needs to be redirected to the mobile version of the site (home page) if it’s trying to access the site from a mobile device.

How to redirect your site to a mobile version through JavaScript « Sebastiano Armeli's Tech Blog

UPDATE 25/07/2011 : Version 0.9.5 released with support for “tablet_url”, “keep_path” and “keep_query” properties. Ipad and other tablet devices have been excluded from the list of mobile devices by default. You can use “tablet_redirection” and “tablet_url” parameters for tablets. To solve this problem, the best approach is implementing something server-side, and I find a good approach using the WURFL file to check the capabilities and features of mobile devices. Read here to know more about WURFL. Sometimes, a server-side solution can become difficult to implement especially if we have a CDN or reverse proxy (sitting in front of our Web Server) caching our pages.

Here JavaScript comes to the rescue and I wrote a script that makes the redirection happen called ”redirection_mobile.js”. You can find the source here on Github. Go to main site.