homepage Welcome to WebmasterWorld Guest from 54.227.77.237
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Virtual URL name
crankshaft




msg:1306090
 11:53 am on Jan 21, 2006 (gmt 0)

Hi all;

I am able to retrieve the server name with $SERVER_NAME but I have several domain names pointing to the same site and I need to detect which URL the user entered into his browser to reach the site.

i.e. 2 domain names domain1.com and domain2.com both point to the domain1.com server, some users get there through the urlo domain1.com and others by entering domain2.com into their browser.

When the page loads I need to detect which one they used to get there?!

Is it possible & if so how?

Thanx so much

PeterC

 

LeChuck




msg:1306091
 1:12 pm on Jan 21, 2006 (gmt 0)

$server=getenv("HTTP_HOST");

crankshaft




msg:1306092
 9:37 am on Jan 22, 2006 (gmt 0)

LeChuck

Thanx so much, that works :)

PeterC

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved