PDA

View Full Version : Multiple domain concept



wajones
Fri 1st Jun '01, 4:28am
I don't know if this concept has been mentioned before, maybe it has ??? but here's what I have.



$domain = $HTTP_HOST;
$domain = strtolower($domain);
$domain =str_replace ("www." , "", "$domain");
if ($domain == "domain1.com") {
$styleid=1;
}
if ($domain == "domain2.com") {
$styleid=2;
}


I tried it and it works, I put it in global.php after the require('./admin/functions.php'); commented out the existing style setting routines and now I can have multiple domains pointing to the same scripts same database but different style and templates. In the bburl and homeurl fields you would put http://www.$domain/forums. etc. for your Replacement variables. Of course you lose the ability to switch styles unless you do other more creative things.
Could be used in multiple ways with a little creativety.

This is just a concept not a full blown hack, so take it for what it is. You will have to do a little more hacking to get it fully functional.