RE: [PHP] Simple Question, I think
| From: | Ralph Guzman | Date: | Wed, 03 Oct 2001 08:02:54 +0000 |
| Subject: | RE: [PHP] Simple Question, I think | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69725@lists.php.net to get a copy of this message | ||
I would suggest you implement this at the web server level. If using Apache,
use virtual hosting or perhaps a rewrite condition if needed.
If you must do this in PHP, and you want to do is redirect the user to a
particular directory depending on the URL they type, then something like
this should work:
switch ($HTTP_HOST) {
case www.firstdomain.com:
header("Location: http://www.domainname.com/dir_01");
break;
case www.seconddomain.com:
header("Location: http://www.domainname.com/dir_02");
break;
case www.thirddomain.com:
header("Location: http://www.domainname.com/dir_03");
break;
}
Ralph
-----Original Message-----
From: Ratfish [mailto:ratfish@mac.com]
Sent: Monday, October 01, 2001 7:25 PM
To: php-general@lists.php.net
Subject: [PHP] Simple Question, I think
All I want to do is what an ASP page I have is doing.
I just want to host multiple sites with one page like the one in the article
below until I can get my head around the real way of doing it.
http://www.zdnet.com/devhead/stories/articles/0,4413,2418330,00.html
Surely there is a PHP equivalent?
Thanks
Andrew
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net