Hello
I just got a new domain.
I configured this new domain as an "addon domain" (in Cpannel)as this newdomainname.com can be swapped with my other olddomainname.com.
But I would like to have a different entry page for these 2 domains... is it possible to do such a thing ? 😕
If yes, I would really need your help 😉 as I don't know how to do such a thing.
My actual rederictor code looks like this:
myolddomainname.com redirects the visitor to the english page by default unless specified differently in a cookie:
if (isset($_GET['newlanguage'])) {
setcookie('language',$_GET['newlanguage'],$expires);
$lang = $_GET['newlanguage'];
$langdir = strtolower($lang);
header("location: $langdir/index.php?newlanguage=$lang");
exit();
}
if (isset($_COOKIE['language'])) {
$langdir = strtolower($_COOKIE['language']);
if ($langdir != '') {
header("location: $langdir/index.php");
exit();
}
}
else {
setcookie('language','Eng',$expires);
header("location: eng/index.php?newlanguage=Eng");
exit();
}
Now, I would like to add a "if domain is mynewdomainname.com = set the default entry page like this:
else {
setcookie('language','Ger',$expires);
header("location: ger/index.php?newlanguage=Ger");
exit();
}
Is this possible ? Or am I obliged to use my new domain as a simple pointer instead of an addon domain ?
I hope my explanation was clear enough 😉
Thank you very much for helping 🙂