Home   My Faqts   Contributors   About   Help   Link to FAQTS  

faqts : Computers : Programming : Languages : Php : Common Problems : HTTP Headers

Entry Add Entry Alert - Edit this Entry

Did You Find This Entry Useful?

17 of 30 people (57%) answered Yes
Recently 4 of 10 people (40%) answered Yes

I have two subdomains pointing to the same index.php3. How can I find out which subdomain was entered by the user?

Aug 17th, 2000 16:48

Kelson Vibber, Kaspar Althaus

Use the HTTP Host variable (in PHP, this shows up as $HTTP_HOST).  
That'll tell you whether the user is looking at site1.mydomain.com or 
site2.mydomain.com (or even www.myotherdomain.com).

© 1999-2005 PowWeb Inc.