Question Locked

How do I Redirect viewers to Mobile Version of Our Website?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to redirect mobile browsers (iPhone,Android,Tablets) from our main site to the mobile version of our site.

After looking around I found the following code:

isMobile() && isset($_COOKIE['mobile']))
{
$detect = "false";
}
elseif ($detect->isMobile())
{
header("Location:http://www.careersinstlouis.com");
}

I ran the mobile_detect.php demo and it detects mobile browsers, but when I try it out, it never makes the switch.

Any suggestions?

2 replies

This discussion is closed to new replies.