Okay, I have done a little bit of digging and now know that I can use $HTTP_HOST to get the actual host name the person typed in. That is great and works like a charm.
What I need to do now though is write an expression that will parse the $HTTP_HOST variable and give me the actual domain name. As it stands, people can reach the hosts by either tying in:
http://www.domain1.com or
http://domain1.com
the $HTTP_HOST variable will return the string for each of the above...
www.domain1.com
domain1.com
how can I strip out the "www" if it exists and just grab the actual domain name?
So in the end I would have a script that went something like this:
// Grab host name and define
// hostname variable
$hostname = "$HTTP_HOST";
if ($hostname == "domain1) {
start session and
load domain1 specific info
}
if ($hostname == "domain2) {
start session and
locad domain2 specific info
}
Again, any help is always more than appreciated.