-
1. Re: Having my site recognize a mobile device and redirect to the mobile site
Lon Winters Aug 15, 2010 11:58 PM (in response to BearHNC)What do you mean by "Do I need a separate PHP in my root folder?" Do you mean a separate PHP page?
Have you created the mobile version of your site?
I guess I don't know about all these other solutions out there, but I thought all you need was a detection script that detects the browser that's being used, not the device. This is captures in a pre-defined server variable and the exact code and syntax depends on what web server your site is on.
So basically, on your index page you retrieve this server variable to detect the browser, and if it's determined to be a mobile browser or mobile version of a browser then you simple redirect to your mobile site's index page.
Another thing to think of tho, is given the various mobile platforms these days is that if you actually want to redirect. For example, if Mobile Safari is detected then that means it's an iPhone, iPod Touch or now even, iPad. Very few sites redirect these, if any, especially with the iPad in the mix. But, Browsers that are in a flip phone or something with the small screen you will want to redirect.


