htaccess ile yalnızca browser diline bakarak yapabilirsiniz,
RewriteCond %{HTTP:Accept-language} tr [NC]
RewriteRule ^$ /tr [L,R=301]tavsiyem geoip kullanmanız,
https://github.com/maxmind/geoip-api-php adresinden api dosyasını indirin,
http://geolite.maxmind.com/download/...y/GeoIP.dat.gz adresinden de ülke veritabanını indirin
aşağıdaki gibi kullanabilirsiniz,
require_once("geoip/geoip.inc");
$gi = geoip_open("geoip/GeoIP.dat",GEOIP_STANDARD);
$country_code = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
geoip_close($gi);
if($country_code == 'TR'){
header('Location: http://www.google.com.tr');
}veya birden fazla ülke için,
if($country_code == 'DE'){
header('Location: http://www.google.de');
}
elseif($country_code == 'FR'){
header('Location: http://www.google.fr');
}