iPhone redirect

M

Mike Row Soft

I am using this code

<?php

$browser = $_SERVER['HTTP_USER_AGENT'];

$agent = substr($browser, 0, 7);

switch($agent) {
case "Mozilla":
header("Location: index.html"); // this is where you put the page you
want desktops to see
break;
default:
header("Location: wml/index.wml"); // this is where your page for
mobiles goes
}
?>

to send PC visitors to my homepage and mobile visitors to my mobile page.
It works great on PDAs, but not at all on iPhones. Anybody know how to beef
it up to recognize iPhones, too?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top