sub domains with sub pages

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
buzzby
Forum Members
Forum Members
Posts: 24
Joined: Fri Aug 12, 2005 9:03 am

sub domains with sub pages

Post by buzzby »

hi

i was wondering if there is any way at this point in time to have sub domains with sub pages? so far from what i have found it will be a little tricky. not sure if new incarnations of the cms has already dealt with this. what i would like is to have more than 2 subdomains with each subdomain having sub pages. so it would look like http://subdomain3.mainsite.com/page2.php

is this possible? can it be done currently?

any help on this will be great

cheers
D
Peciura

Re: sub domains with sub pages

Post by Peciura »

Have a look here http://forum.cmsmadesimple.org/index.ph ... 890.0.html

I have only one page that works with 3 domain alias with customized '/config.php'. I am using ugly urls.
Basic mod could look like this
switch ($_SERVER['HTTP_HOST']){
case 'test2.domain1.lt':
case 'www.test2.domain1.lt':
case 'test.domain1.lt':
case 'www.test.domain1.lt':
case 'domain1.lt':{                    /* some domain aliases */
$config['root_url'] = 'http://'.$_SERVER['HTTP_HOST'];
break;
}
default:{                    /* default domain name */
$config['root_url'] = 'http://www.domain1.lt';
break;
}
}

$config['root_path'] = dirname(__FILE__);

$config['admin_dir'] = 'admin';

$config['previews_path'] = $config['root_path'].'/tmp/cache';

$config['uploads_path'] = $config['root_path'].'/uploads';

$config['uploads_url'] = $config['root_url'] . '/uploads';
In addition You could add different DB credentials and/or paths for each domain.
switch ($_SERVER['HTTP_HOST']){
case 'test2.domain1.lt':
case 'www.test2.domain1.lt':
case 'test.domain1.lt':
case 'www.test.domain1.lt':
case 'domain1.lt':{                  /* specific DB for some domains; Can be specified for each domain */
$config['root_url'] = 'http://'.$_SERVER['HTTP_HOST'];
$config['db_username'] = 'username2';
$config['db_password'] = '#########2';
$config['db_name'] = 'test_username2';
break;
}
default:{                  /* default DB for default domain */
$config['root_url'] = 'http://www.domain1.lt';
$config['db_username'] = 'username1';
$config['db_password'] = '#########1';
$config['db_name'] = 'test_username1';
break;
}
}
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: sub domains with sub pages

Post by calguy1000 »

Buzzby:  Please PAY ATTENTION and follow forum rules when posting.

Also.  CMSMS does not, and will not in any way support multiple domain installs.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “The Lounge”