I am trying to set up a multi site configuration, and I ran into a problem. I installed Revo (beta-1) on the first subdomain and got it working. I then create a second subdomain and copied over index.php and config.core.php (and my assets directory for the moment...plan to move assets to a separate subdomain so they can be shared nicely).
In the manager I created two new contexts, with a resource in each context, and I edited index.php in both subdomains as follows
$modx->initialize(’nameofmyuniquecontexthere’);
So the first site comes up fine, but not the second. Why? Because I can only have one site_start--and the second context can access resource 1 in the first context. So I created a .htaccess with the following line
DirectoryIndex index.php?q=2
Sure, it works....but isn’t there a better way? Of course I will run into the same problem with havin only one error page, one unauthorized page, etc. Is there any way for each context to have its on set of site settings? Or is there a better approach to whole multi-site setups?
-
MODX Staff
- 730 Posts
Sounds like you want "Context Settings".
Easy! Right-click on your Context and select Edit Context.
See attached screenshot for a simple example of some Context Settings I have set up for a subdomain.
(Not all of the settings there are for handling the subdomain.)
-
MODX Staff
- 730 Posts
Muh haha ha hahaaaaaa!
I don’t say this enough but I love you guys