did you try echo the result to see what's going on?
PHP Code:
function redirect()
{
$lang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
echo $lang; exit();//comment this when finished
switch($lang){
case 'pl':
$redir_url = "http://www.google.pl";
break;
default:
case 'en':
$redir_url = "http://www.allotherbrowsers.com/landingpage.php";
break;
}
header("Location: $redir_url");
}
redirect();