Hi,
I've (unsuccessfully) been writing a script tidbit that takes $http_host and depending on the domain that is given, will continue to execute what that domain is supposed to do. One of the hold-ups is one of my domains I use is part of another domain - e.g. site.com and asite.com. I would also wish to handle sub-domains with this if possible, for instance happy.site.com will continue to do something while *.site.com will execute as site.com would. I hope that makes sense. I'm sure this is just a syntax problem but -any- help is extremely appreciated.
Defunct Script-
<?php
if ( $HTTP_HOST == "site.com$" || ".site.com$" )
{ print "Hey you found site.com!<br>"; }
elseif ( $HTTP_HOST == "asite.com$" || ".asite.com$" )
{ print "Hey you found asite.com!<br>"; }
elseif ( $HTTP_HOST == "anotherwesite.com$" || ".anotherwebsite.com$" )
{ print "Another thing <br>"; }
else
{ print "You probably got here by IP address or something.";}
?>