<?php
if(strstr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'tr')){
header("Location:http://www.site.com/tr");
}elseif(strstr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'en')){
header("Location:http://www.site.com/en");
}elseif(strstr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'de')){
header("Location:http://www.site.com/de");
}elseif(strstr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'fr')){
header("Location:http://www.site.com/fr");
}else{
header("Location:http://www.site.com/");
}
?>Bu şekilde kullanılan dil'e göre uzayabilir.
<?php
if(strstr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'tr')){
header("Location:http://www.site.com/tr");
}elseif(strstr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'en')){
header("Location:http://www.site.com/en");
}else{
header("Location:http://www.site.com/");
}
?>