We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13003
    • 18 Posts
    yes, that’s possible, but that would mean multiple locations to manage your domains (i.e. - manage the domain in htaccess, manage the domain in each individual index.php, etc)

    a couple years ago when I was on the Xoops dev team, I created a Multi-Sites mod (which Mithrandir continued after I left). a single code-base was used for each site, the sites were served up based on the requested domain. had a configuration file for each site, and i modified the addon modules so that you could choose a specific "Site ID" for each piece of content (or you could leave it at the overall selection so that the piece of content would be available across all sites). additionally, if you wanted, you could references all content across all sites if you wanted, since it’s accessible in the DB

    I don’t believe I had to work up any special htaccess rules for that, just PHP/SQL. worked well for me, but that was then and this is now smiley
      • 27889
      • 415 Posts
      Can you post it please ?
        MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
        MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
        • 13003
        • 18 Posts
        in the xoops community, I went by the name bd_csmc, fyi (there was a mixup in the registration of my username "intel352", email went to bad email address, never got it resolved).

        anyways, here’s the thread from xoops.org
        http://www.xoops.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=32570&forum=14

        files are in the first post. i would suggest reading mithrandir’s post to get ideas for how multisites could be implemented (since obviously, this code will not work for modxcms)

        additionally, drupal has a good multisites implementation in their core code, and there are similar hacks for joomla floating around
          • 27889
          • 415 Posts
          Thanks I’m going to check it.
            MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
            MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
            • 22303 MODX Staff
            • 10,725 Posts
            Just a quick FYI on the subject, the next release following 0.9.5 will most-likely contain a solution to this in the form of what I like to call Contexts. This additional organizational structure will allow you to run as many different sites, sub-sites, localized sites, etc. as you want to. Each Context starts with the familiar MODx system settings, which is then merged with a Context-specific set of settings that can supplement and/or override the base settings. Each Context is responsible for it’s own document tree, Contexts can share common documents, and Plugins can even be limited to specific Contexts as well.
              • 26325
              • 36 Posts
              Quote from: OpenGeek at Sep 12, 2006, 03:14 AM

              Just a quick FYI on the subject, the next release following 0.9.5 will most-likely contain a solution to this in the form of what I like to call Contexts. This additional organizational structure will allow you to run as many different sites, sub-sites, localized sites, etc. as you want to. Each Context starts with the familiar MODx system settings, which is then merged with a Context-specific set of settings that can supplement and/or override the base settings. Each Context is responsible for it’s own document tree, Contexts can share common documents, and Plugins can even be limited to specific Contexts as well.
              OK, now I’m even more excited about MODx!
                Visit MODx.mobi to read these forums on mobile devices.
                • 13003
                • 18 Posts
                ha, awesome, i’ll have to check out the pre-release
                  • 33372
                  • 1,611 Posts
                  This is indeed a very helpful bit of code. In my case I have a bilingual site (English/Spanish) with two domain names (one in each language). The site start is the English home page, but I wanted to automatically forward folks coming to the Spanish domain name to the Spanish home page. This code lets me do that.

                  I used just this:

                  $e = &$modx->event;
                  if($e->name=='OnWebPageInit') {
                     if($_SERVER['HTTP_HOST']=='www.dominioenespanol.org' && $modx->documentIdentifier==$modx->config['site_start']){
                        header('Location: espanol.html');
                        exit;
                     }
                  }


                  I use base href tags in my templates for the rest of the links, so I didn’t need to change the configs as well.

                  The location that I’m forwarding to is the alias of the Spanish home page, which works only if you’re using friendly URLs of course.
                    "Things are not what they appear to be; nor are they otherwise." - Buddha

                    "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                    Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                    • 17383
                    • 2 Posts
                    Quote from: OpenGeek at Sep 12, 2006, 03:14 AM

                    Just a quick FYI on the subject, the next release following 0.9.5 will most-likely contain a solution to this in the form of what I like to call Contexts. This additional organizational structure will allow you to run as many different sites, sub-sites, localized sites, etc. as you want to. Each Context starts with the familiar MODx system settings, which is then merged with a Context-specific set of settings that can supplement and/or override the base settings. Each Context is responsible for it’s own document tree, Contexts can share common documents, and Plugins can even be limited to specific Contexts as well.

                    Is this feature already included in a beta version or something?
                      • 17383
                      • 2 Posts
                      Would somebody of the core team implement this feature for money?
                      How much would it cost?

                      Thanks!