[thelist] Redirection
Jay Blanchard
jay.blanchard at niicommunications.com
Mon Jul 29 06:53:01 CDT 2002
--
[snip]
I have 2 domains and I've got one parked over the other and what I am trying
to do is have any requests for domain 2 sent to a different set of pages.
Trying this in PHP. Here's what I tried:
<?
//begin header redirection
if ($HTTP_HOST == "domain1.com" || "domain1")
{header("Location: http://www.domain1/domain1.html")
elseif ($HTTP_HOST == "domain2.com" || "domain2.com")
{header("Location: http://domain2.com/domain2.html")
//ends it}
?>
Change the syntax on your header lines
<?
//begin header redirection
if ($HTTP_HOST == "domain1.com" || "domain1"){
header("Location: http://www.domain1/domain1.html");
exit;
} elseif ($HTTP_HOST == "domain2.com" || "domain2.com"){
{header("Location: http://domain2.com/domain2.html");
exit;
}
//ends it}
?>
HTH!
Jay
*************************************
* Want to meet other PHP developers *
* in your area? Check out: *
* http://php.meetup.com/ *
* No developer is an island ... *
*************************************
***************************************
* *
* Texas PHP Developers Meeting *
* Spring 2003 *
* T Bar M Resort & Conference Center *
* contact *
* jay.blanchard at niicommunications.com *
* *
***************************************
--
[ winmail.dat was deleted, please don't send attachments with your message. ]
--
More information about the thelist
mailing list