Hi All, I have the following mobile re direct script working on one website, but not another,
For some reason I am getting the error -
Can not modify headers information - header already sent - etc etc
On line 20
Any ideas why this would work for one website and not the other ?
`
<?php
//Config
$url = "http://m.domain.com";
//detection
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
//Android
if(strstr($ua,'android')) { // && stripos($ua,'mobile') !== false) {
header('Location: '.$url);
exit();
}
//iOS
if(strstr($ua,'iphone') || strstr($ua,'ipod') || strstr($ua,'ipad'));
{
header('Location: '.$url);
exit();
}
//BlackBerry
if(strstr($ua,'lackerry') || strstr($ua,'playbook'))
{
header('Location: '.$url);
exit();
}
//WindowsPhone
if(strstr($ua,' windows phone os'))
{
header('Location: '.$url);
exit();
}
?>
Thanks in advance...