include header.inc.php based on HTTP_HOST
Posted: Sun May 23, 2010 12:15 am
I want to first thank some of you guys for the help lately. It is much appreciated.
Now I have to move on to a new step. I have 2 sites that both load a header.inc.php. In both cases these files are the top of the page with images and navigation. I believe these are called as include statements on both sites.
I have mydomain.com pointed there as well as sub.otherdomain.com
I want to modify the scripts to look for for the HTTP _HOST and if the host is sub.otherdomain.com, a different header.inc.php will be loaded such as XXheader.inc.php.
Of course is the host is www.mydomain or mydomain.com (or any other domain for that matter), I need to load the default header.inc.php
I have looked at several code samples and found them quite confusing. Sample code appreciated, and always helps with some explanation.
thanks for any help in advance
Now I have to move on to a new step. I have 2 sites that both load a header.inc.php. In both cases these files are the top of the page with images and navigation. I believe these are called as include statements on both sites.
I have mydomain.com pointed there as well as sub.otherdomain.com
I want to modify the scripts to look for for the HTTP _HOST and if the host is sub.otherdomain.com, a different header.inc.php will be loaded such as XXheader.inc.php.
Of course is the host is www.mydomain or mydomain.com (or any other domain for that matter), I need to load the default header.inc.php
I have looked at several code samples and found them quite confusing. Sample code appreciated, and always helps with some explanation.
thanks for any help in advance