To run multiple "child" websites from a single Sitellite installation, the easiest way is to follow these configuration steps:
1. Ensure that each child site is specified as an alias of the main site in the main site's Apache VirtualHost entry, ie.
ServerName www.parentsite.com
ServerAlias www.childsite1.com
ServerAlias www.childsite2.com
ServerAlias www.childsite3.com
2. Create the file inc/app/webapp/boxes/index/index.php with the following code in it:
<?php
header ('Location: /index/' . preg_replace ('/^www\.([^\.]+)\.com$/', '$1', site_domain ()));
exit;
?>
This will forward users to the appropriate index page depending on the domain name in question, without actually changing the domain name.
3. Create a separate template for each sub-site as well as for the parent site, all part of the same template set. If your set name is other than "default" you'll also need to update the default_template_set value in Control Panel > Admin > Site Settings. You can use the SiteTemplate add-on to work with the templates. Note that the main site template will be the "default" template, but you should name the others according to the site names.
4. Create an index page for each site with the ID specific to the domain name of the site, ie. for www.parentsite.com the ID would be parentsite. For each of the sub-site index pages, make sure you set Properties > Section to Yes. This will ensure that by default the child pages also look like that sub-site and not the main site.
5. Change the following two Sitellite settings in inc/conf/config.ini.php (or better, change them via the Control Panel > Admin > Site Settings):
default_handler = webapp/index
default_handler_type = box
You can then go about creating additional pages underneath the different site index pages and building the rest of the functionality of your website.
Revision from August 1, 2007 1:15 PM by anonymous
Back in time (1 more) | Linked from: Miscellaneous, Administration