Page 1 of 1

How to use CMSMS with 2 sub-domains?

Posted: Tue Mar 29, 2011 7:23 am
by dmaireroa
Hi there

I am building this website and want to use CMSMS for 2 sub-domain under the one domain name. First, I will build a landing page with 2 different buttons linking to 2 sub-domains; 12.name.com and 13.name.com. Is there a way to use the same CMSMS for more than one sub-domain or do I have to install 2 separate CMSMS?

Many thanks in advace
CHEERS :)

Re: How to use CMSMS with 2 sub-domains?

Posted: Tue Mar 29, 2011 1:55 pm
by Wishbone
For starters, you would have to replace the hard-coded value in $config['root_url'] in config.php with something like:

Code: Select all

$config['root_url'] = 'http://' . $_SERVER['SERVER_name'];
..otherwise, no matter which subdomain you are on, whenever you click on something, it will go back to the domain that it was installed with.

Re: How to use CMSMS with 2 sub-domains?

Posted: Tue Mar 29, 2011 4:08 pm
by markS
Hello,

Well there's a module I've been considering using for a client who needs this functionality:

http://dev.cmsmadesimple.org/projects/multidomains

Please note that I've not tried it, used it or have anything to do with it. I am intending to give it a test drive soon and see if it handles what I want.

Perhaps it will be useful for you?

Cheers,
Mark.

Re: How to use CMSMS with 2 sub-domains?

Posted: Wed Mar 30, 2011 11:03 am
by dmaireroa
Too easy, if not then will do it the old fashion way ;)

Thanks