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?