The website I am working on is for a competition. When it closes, I would like to redirect all requests to a “closed” page. I have set up the page at /closed, what is the best way of ensuring all visitors end up there, no matter the page / url they are trying to view? I tried a route using (:all) but it doesn’t seem to be working
All would be right, but would also include closed, so you need an if statement inside the route that returns the closed page while all other pages are redirected.
But the problem is that if you have other routes, they will not work with this catch-all. So you need another condition when this route should take effect, e.g. after a given date.