On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I have a sub domain rewrite setup on modxcloud.

    if ($host = "hub.mydomain.com") {
      rewrite ^ https://www.mydomain.com/pages/solutions/hub/index.html permanent;
    }


    This works.

    However I was wondering how to (or if there was a way?) redirect to a sub folder on that domain?

    if ($host = "hub.mydomain.com/save") {
      rewrite ^ https://www.mydomain.com/pages/solutions/hub/save/index.html permanent;
    }


    This does NOT work. Trying to figure out a solution?

    This question has been answered by smorris. See the first response.

      Tink!
    • discuss.answer
      For anyone stumbling upon this, instead of deleting I will just leave it. The solve is below. Will need to go into a location block.

      location ~ ^/save {
          return 301  https://www.mydomain.com/pages/hub/save/index.html;
      }
        Tink!