We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50665
    • 2 Posts
    I setup a second context and have everything working. However, when using Friendly URLs all pages except the index of the subdomain get redirected to the 404 of the original domain. The original domain works as expected. The HTTP headers are passing a 302 error. Any ideas?
      • 46039
      • 76 Posts
      What routing method are you using? If I recall you need to change the context dynamically using a routing plugin linked to page calls.

      It sounds like you're looking for pages in the wrong context.
        • 50665
        • 2 Posts
        Quote from: johnnyp at Jun 28, 2015, 09:49 PM
        What routing method are you using? If I recall you need to change the context dynamically using a routing plugin linked to page calls.

        It sounds like you're looking for pages in the wrong context.

        Thanks for your reply Johnny! I'm not sure what you mean by routing plugin. I've setup multiple domains on one MODx before (not on this server) and haven't needed any plugins. I set it up by using a tutorial similar to this one, using option 1 (direct to correct context using single index page) http://www.belafontecode.com/modx-revolution-hosting-multiple-domains/

        Also if I turn off friendly URLs everything works correctly. Both contexts load independently. Once I turn friendly URLs back on, they stop working for my second context and show status headers of 302, not 404. But redirect to the 1st context 404 page (and change the URL in the browser's address bar).

        If you still think a routing plugin would help, which one?

        EDIT: Clarity
          • 46039
          • 76 Posts
          Ah I see that this method involves editing the index page. I don't touch the core, I always use extending; hence using a plugin.

          I don't think I ever got multi context 404s to work personally, so that may be a red herring. If I recall it always hit the 'web' 404 page, despite overriding the context specific setting.

          You may want to share your .htaccess file here, because it sounds like that may well be the issue. Maybe you didn't remove the furl directive for the original domain from the .htaccess in the sub dir?

          Personally I mostly use nginx, so I may not be able to help, but someone else could spot the issue.