How to use CMSMS with 2 sub-domains?

General project discussion. NOT for help questions.
Post Reply
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

How to use CMSMS with 2 sub-domains?

Post 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 :)
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

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

Post 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.
markS
Forum Members
Forum Members
Posts: 58
Joined: Wed Aug 20, 2008 3:04 pm

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

Post 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.
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

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

Post by dmaireroa »

Too easy, if not then will do it the old fashion way ;)

Thanks
Post Reply

Return to “General Discussion”