If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.
Register Today on DNForum IT'S FREE!Hello
I want to point several domains to my site - and using a script I was wondering if it's possible to route the domains to different files or directories?
So traffic from mydomain.com gets routed to mydomain.php and so fourth ..
Thanks
I Will Buy/Swap Your Traffic Domains - Type-In & Typos (no adult) - contact me -> ASAP!
..or you can do this via php:
IF all domains get redirected to www.centralDomain.com/index.php
$host=str_replace("www.","",strtolower($_SERVER["HTTP_HOST"]));
switch($host):
{
default:
$redirect="URL HERE";
break;
case: "domain1.com":
$redirect="domain1 redirect here";
break;
}
header("location: $redirect);
Danie|
That's just what I'm looking for!!
So an example index.php with multiple domains would look like this:
And so forth ..
$host=str_replace("www.","",strtolower($_SERVER["HTTP_HOST"]));
switch($host):
{
default:
$redirect="www.domain1.com";
break;
case: "domain1.com":
$redirect="domain1.php";
break;
}
{
default:
$redirect="www.domain2.com";
break;
case: "domain2.com":
$redirect="domain2.php";
break;
}
header("location: $redirect);
I Will Buy/Swap Your Traffic Domains - Type-In & Typos (no adult) - contact me -> ASAP!
yes, pretty much.
<?php
$host=str_replace("www.","",strtolower($_SERVER["HTTP_HOST"]));
switch($host)
{
default:
$redirect="www.domain1.com";
break;
case: "domain1.com":
$redirect="domain1.php";
break;
case: "domain2.com":
$redirect="domain2.php";
break;
}
header("location: $redirect);
?>
That's great, I'll get something up and running and give it a try ..
Thanks man!
I Will Buy/Swap Your Traffic Domains - Type-In & Typos (no adult) - contact me -> ASAP!
Bookmarks