Re: PHP Redirector Anyone??
| From: | skate | Date: | Mon, 21 Jul 2003 19:10:14 +0000 |
| Subject: | Re: PHP Redirector Anyone?? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-20855@lists.php.net to get a copy of this message | ||
$_SERVER["SERVER_NAME"]
then just do a switch on the $_SERVER["SERVER_NAME"] and then
header("Location:....") to redirect them.
there may be a tidier way, but that's what i do...
-skate-
----- Original Message -----
From: "Shaffin Bhanji" <Shaffin.Bhanji@novell.com>
To: <php-windows@lists.php.net>
Sent: Monday, July 21, 2003 8:04 PM
Subject: [PHP-WIN] PHP Redirector Anyone??
> Hello,
>
> I need a PHP redirector for my server in which I host multiple web
> sites as follows:
>
> Site 1
> ====
> Local Path: /var/www/htdocs/site1
> Server IP: 192.168.1.10
> URL: www.site1.com
>
> Site 2
> ====
> Local Path: /var/www/htdocs/site2
> Server IP: 192.168.1.10
>
> URL: www.site.com
>
> When someone refers to either www.site1.com or www.site2.com, I need
> them to be redirected to a specific local directory respectively. Can
> someone help doing this via PHP?
>
> Thanks,
> Shaffin.
>
>