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?
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 ...
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?
Yes, you can look at the HTTP_HOST environment variable.
If you use PHP, both of these lines will show you:
--JasonPHP Code:<?
echo($_ENV["HTTP_HOST"]);
echo($HTTP_HOST);
?>
Copyright © 2011 JaguarPC.com
Bookmarks