CurtWRC
02-09-2006, 01:08 PM
Hello,
I have an account at brinkster.com for my website, http://www.rallystuff.net. As I have a separate website within a folder on my site (http://www.rallystuff.net/lomax/index.aspx) I want use a subdomain called http://mosasaur.rallystuff.net to access this site. However when brinkster created me this subdomain it takes you to the homepage of my main site. They have told me that to redirect this link to /lomax I have to use the code below. However because my knowledge of PHP is very limited as I code in ASP.NET, and I haven't got contact with the guy who originally designed my site I don't know how to edit this code to make it work.
Any help would be most appreciated,
Thanks,
Curt.
<?
$SiteNameURL = $_SERVER['HTTP_HOST'];
switch ($SiteNameURL) {
case "domain.com":
include 'page1.php';
break;
case "www.domain.com":
include 'page1.php';
break;
case "yourotherdomain.com":
include 'page2.php';
break;
case "www.yourotherdomain.com":
include 'page2.php';
break;
case "subdomain1.domain.com":
include 'page3.php';
break;
case "subdomain2.domain.com":
include 'page4.php';
break;
default:
include 'other.php';
}
?>
I have an account at brinkster.com for my website, http://www.rallystuff.net. As I have a separate website within a folder on my site (http://www.rallystuff.net/lomax/index.aspx) I want use a subdomain called http://mosasaur.rallystuff.net to access this site. However when brinkster created me this subdomain it takes you to the homepage of my main site. They have told me that to redirect this link to /lomax I have to use the code below. However because my knowledge of PHP is very limited as I code in ASP.NET, and I haven't got contact with the guy who originally designed my site I don't know how to edit this code to make it work.
Any help would be most appreciated,
Thanks,
Curt.
<?
$SiteNameURL = $_SERVER['HTTP_HOST'];
switch ($SiteNameURL) {
case "domain.com":
include 'page1.php';
break;
case "www.domain.com":
include 'page1.php';
break;
case "yourotherdomain.com":
include 'page2.php';
break;
case "www.yourotherdomain.com":
include 'page2.php';
break;
case "subdomain1.domain.com":
include 'page3.php';
break;
case "subdomain2.domain.com":
include 'page4.php';
break;
default:
include 'other.php';
}
?>