PricingBlog

Catch-All Redirect

  • technikobst-1447518875712229397

    Marcel

    1 month ago

    Ist it possible to setup an catch-all redirect? I would like to temporarily redirect all pages of the domain to a maintenance page.
  • erikbeus-1447522430254846042

    Erik Beuschau

    1 month ago

    No. But you could set up 2-3 redirects to catch your front page + all dynamic pages:
    - /
    - /:level1
    - /:level1/level2
    For all static pages, you would need to create specific redirects though (for /about for instance)

    Alternatively, you could delete all your pages, Adjust your 404 page to show your maintenance message and roll back your deletions once your maintenance is over 🤷‍♂️
  • technikobst-1447591684375314463

    Marcel

    1 month ago

    oh okay. Is it planned to support this kind of redirects?
  • erikbeus-1447603225661411428

    Erik Beuschau

    1 month ago

    Not on our current list of priorities. But there are definitely a few additional things that could be improved/supported in our routing (also for pages). I'll add a ticket for this internally so we can discuss 👍
    👍1
  • technikobst-1447603302198939648

    Marcel

    1 month ago

    Thanks
  • baba_bambule-1449136257673199908

    BabaBambule

    1 month ago

    you could also for this case create a component that is used on every page and have an action trigger on load that redirects users to your maintenance page. I'm using something similar and we have an sc-provider wrappen in a page-wrapper component. Here we can set an attribute if we need to toggle our maintenance mode. On our maintenance website we have a formula for get current url->get path and if its maintenance we don't need to trigger the script