mxunal adlı üyeden alıntı: mesajı görüntüle
<?php
ob_start();
$lg = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
if ($lg == 'tr') {
$git = "http://www.site.com/";
}
else {
$git = "http://www.site.com/".$lg."/";
}
header("Location: $git");
?>
bu şekilde.
bu şekilde bir döngü içine girer cikamaz anasayfayi acar dil kontrolünde tekrar anasayfayi acar ana sayfayi tekrar acinca yine dil kontrolünde yine ana sayfayi acar yine ana sayfaya gelince yine dil kontrolünde yine anasayfayi acar... böyle uzar gider
<?php
ob_start();
$lg = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
if ($lg != 'tr') {
$git = "http://www.site.com/".$lg."/";
header("Location: $git");
}
?>
bu şekilde denermisin