We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36551
    • 416 Posts
    I wish there were better documentation or examples of how this should be setup. There is nothing that explains the proper syntax or format of the key values, what the values should be or what keys are needed for what. We spent way too much time trying to sort this out. So hopefully this will help others, brave enough to try to use contexts on the projects.

    So it seems simpler is better. With this setup links are working across contexts, wayfinder and getResources is working and images & links in TinyMCE are working now.

    Context: web

    base_url: /
    http_host: svaroopa.org
    link_tag-scheme: full
    site_start: 1
    site_url: http://svaroopa.org/ (must have trailing slash)

    Context: svaroopa-build.com

    base_url: /
    http_host: svaroopa-build.com
    site_start: 1072
    site_url: http://svaroopa-build.com/ (must have trailing slash)


    While trying to figure out how to set this up, I found several forum entries that specified a lot of different keys and a variety of values for those keys. Which I attempted to use early on (see previous posts). Some of them were either not necessary or just wrong.

    Finally, after much difficulty, we've learned some key items:

    base_url should be just a slash
    The site_url must have the http:// and a trailing slash
    The http_host should NOT have the http:// only the site_url should have this.
      • 36551
      • 416 Posts
      Another bit of useful info for this.

      The default .htaccess for rewritting www to no-www and no-www to www caused the second domain to be rewritten to the primary domain. After some searching if found this. Seems to do the trick. Comment out per your choice.


      # redirect www to no-www

      #RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
      #RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

      # redirect no-www to www

      RewriteCond %{HTTP_HOST} ^(?!www\.)(.+) [NC]
      RewriteRule ^(.*) http://www.%1/$1 [R=301,NE,L]
        • 42562
        • 1,145 Posts
        What Extra is handling your TinyMCE, and what really is the issue again?
          TinymceWrapper: Complete back/frontend content solution.
          Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
          5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
          • 36551
          • 416 Posts
          Quote from: donshakespeare at Nov 11, 2015, 11:15 AM
          What Extra is handling your TinyMCE, and what really is the issue again?

          The original issue was resolved once the context settings were correct. I found a lot of conflicting information on setting up contexts. So at this point I'm just documenting what worked for setting up the contexts and then the htaccess for proper rewrites.