We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • discuss.answer
    Found it (with thanks to the guys at ModMore):

    I had to tweak this in the htaccess:

    #RewriteCond %{SERVER_PORT} !^443
    #RewriteRule (.*) https://www.primarydomain.nl/$1 [R=301,L]
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
      • 54653
      • 10 Posts
      Gerben,

      Before I start setting up a new context, say domain1, I run a simple test: I create an index.html file in the domain's home directory, ie.., teg ine where the domain's index.php file is) that just contains something like "Welcome to domain1!".

      If I can see its contents by entering in the browser the file's URL (in this case, https://www.domain1.nl/index.html), I can be sure the virtual host has been configured correctly. This tells me than that any issue has to be caused by that context's settings.

      Also, say I am working in my MODX manager at https://www.modxserver.nl/web/manager on a page called domain1page.html in the domain1 context (I am assuming I have friendly URLs enabled here) as soon as I click the View button to check that page's rendering, the URL in the browser's address bar changes to domain1's URL, i.e, https://www.domain1.nl/domainpage.html.

      Can you run both the above checks on your installation and let us know how they work for you?

      Thanks,

      Massimo
      • The web context was working fine, so no need for testing with an index.html file. See above.

        The contexts were also fine. The contexts could also be previewed without problems. See above.

        It was the configuration in my htaccess which needed some tweaking. So my post above.
          • 54653
          • 10 Posts
          Glad you were able to solve it!

          Cheers,

          Massimo