We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50960
    • 17 Posts
    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
      • 50960
      • 17 Posts
      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!