I have uploaded a site in english(http://calvindeveloping.tk) but i want to redirect the user if they are from a french countryto this site path - http://calvindeveloping.tk/fr/index.php, so i used the geolocation plugin, the plugin works... except when i try using it in the php header function like this -
if ($geoplugin->countryCode == "FR" || $geoplugin->countryCode == "fr") {
header('Location: calvindeveloping.tk/fr/index.php');
}
Here is my full php code for the english version of the site, placed just before the html code.
$geoplugin = new geoPlugin();
$geoplugin->locate();
$extra = 'fr/index.php';
if ($geoplugin->countryCode == "FR" || $geoplugin->countryCode == "fr") {
header('Location: calvindeveloping.tk/fr/index.php');
exit();
}
?>
Please help as this doesnt seem to work.