We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24935
    • 160 Posts
    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?
      • 21257 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.)
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 28215
        • 4,149 Posts
        Quote from: rfoster at Jun 04, 2009, 11:01 PM

        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?

        As netProphet noted, each Context can have it’s own set of Context Settings, which will override any System Settings. So you’ll just need to define the Context Settings you want to override.

        (On that note, User Settings override Context Settings, so if you wanted user-based domains...*cough*)
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 24935
          • 160 Posts
          Thanks!
            • 21257 MODX Staff
            • 730 Posts
            Muh haha ha hahaaaaaa!
            I don’t say this enough but I love you guys grin
              Mike Schell
              Lead Developer, MODX Cloud
              Email: [email protected]
              GitHub: https://github.com/netProphET/
              Twitter: @mkschell