RE: [PHP] Simple Question, I think

2001-10-03 Thread Ralph Guzman

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:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 7:25 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Simple Question, I think

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Try also mod_rewrite of apache. It is great for doing such things.

Visit apache.org and search docs for mod_rewrite or simply look into
archives of this list.

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Ralph Guzman [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 10.03
To: Ratfish; [EMAIL PROTECTED]
Subject: RE: [PHP] Simple Question, I think


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:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 7:25 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Simple Question, I think

2001-10-03 Thread Ralph Guzman

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:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 7:25 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Simple Question, I think

2001-10-01 Thread Kath

Perhaps check the URL and direct as such using header();.  Use phpinfo(); to
find what var holds the current URL.

- k



- Original Message -
From: Ratfish [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 01, 2001 10:25 PM
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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Simple Question, I think

2001-10-01 Thread Ratfish

Thanks guys, that's just what I wanted to hear.and so quick too!

 From: [EMAIL PROTECTED] (Lawrence Sheed)
 Newsgroups: php.general
 Date: Mon, 1 Oct 2001 22:40:29 -0400
 To: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: RE: [PHP] Simple Question, I think
 
 Simple to do it in php, but i would think its better done in apache using
 virtual host configuration.
 
 do a google search for virtual host apache
 
 
 
 
 -Original Message-
 From: Ratfish [mailto:[EMAIL PROTECTED]]
 Sent: October 2, 2001 10:25 AM
 To: [EMAIL PROTECTED]
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]