Jump to content

Archived

This topic is now archived and is closed to further replies.

mcmuney

Redirection Script for Mobile/Handhel Visits to your Website

Recommended Posts

Is there a script that will redirect handheld visitors to a different webpage. For example, if you visit aol.com using your mobile, you'll see it redirects you to mobile.aol.com. Anyone have that script???

Share this post


Link to post
Share on other sites
I guess that User agent can be used for that. As the browser you use in your mobile and the browser in your desktops are different. As php you can use something like:
[CODE]
if ($_SERVER['HTTP_USER_AGENT'] == "Mobile")
  header("Location:http://mobile.aol.com");
[/CODE]
I'm not quite sure if that if statement will work but it should be something like that. You could try strpos() function too.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.