Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Get hostname of domain alias
January 8, 2007, 6:16 pm
rate this thread
I have a site hosted with PHP. I'm thinking of getting another
hostname and alias it to this host. What I'd then like to do is have a
PHP file (i.e., index.php) that reads a variable from the request that
tells me which hostname is being served. I can then change the title
and whatnot of the returning HTML, depending on which hostname was
used. For example:
$HOSTNM = ???
if ( $HOSTNM == 'abcefg.com' )
$TITLE = 'ABCDEFG';
$TITLE = 'HIJKLM';