Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 2 of 2

This is a discussion on detect domain name used to access site? in the Open Discussion & Chit-chat forum
I'm not sure if this is the proper forum for this. If not, I apologize. If I have two domain names, jhanson.org and jhanson.com, and ...

  1. #1
    JPC Member
    Join Date
    Sep 2002
    Posts
    27

    detect domain name used to access site?

    I'm not sure if this is the proper forum for this. If not, I apologize.

    If I have two domain names, jhanson.org and jhanson.com, and they both point to the same location, is there any way to detect which one the user used to access the page?

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Yes, you can look at the HTTP_HOST environment variable.

    If you use PHP, both of these lines will show you:
    PHP Code:
    <?
        
    echo($_ENV["HTTP_HOST"]);
        echo(
    $HTTP_HOST);
    ?>
    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •