Multiple domains and SERVER_NAME

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • laredotornado@zipmail.com

    Multiple domains and SERVER_NAME

    Hi,

    If I have multiple domains (mydomain1.com, mydomain2.com,
    mydomain3.com) pointing at the same IP, will the call

    echo $_SERVER{'SERVE R_NAME'];

    return the domain name people type into the URL? If not, what is a
    PHP call I can make to determine the domain someone typed in?

    I'm using PHP 4.4.4. Thanks, - Dave

  • Jeff

    #2
    Re: Multiple domains and SERVER_NAME

    $_SERVER['SERVER_NAME'] should work as well as $_SERVER['HTTP_HOST']

    Comment

    Working...