[thelist] Redirection

John Corry webshot at members.evolt.org
Fri Jul 26 17:32:01 CDT 2002


try it like this:
if (($_SERVER['HTTP_HOST'] == "domain1.com") || ($_SERVER['HTTP_HOST']
== "domain1")
	{
	header("Location: http://www.domain1/domain1.html"
	}
elseif (($_SERVER['HTTP_HOST'] == "domain2.com") ||
($_SERVER['HTTP_HOST'] == "domain2")
	{
	{header("Location: http://domain2.com/domain2.html")
	}

I've always had trouble with:
if ($x == 'this' || 'that'), even though according to the docs it seems
like it should work.

John
> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org] On Behalf Of Sean Lawrence
> Sent: Friday, July 26, 2002 12:29 PM
> To: Thelist (E-mail)
> Subject: [thelist] Redirection
>
>
> --
> 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")
> {)
>
>
>
>
>
>
> //ends it}
> ?>
>
> not working, however and this is the first time I've tried
> anything like this.
>
> I think I am either missing something small or got it wrong
> altogether.
>
> Thanks,
>
> Sean
> --
> [ winmail.dat was deleted, please don't send attachments with
> your message. ]
> --
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !






More information about the thelist mailing list