Hello,
I tried to configure a "not found" catch all route like:
m.route.mode = 'hash';
m.route(document.body, '/not-found', {
'/': components.pages.Login,
'/not-found': components.pages.NotFound,
[...]
});
It works fine when I type anything as the URL. But when I load up the page without any hash (http://domain.com/), it redirects to /not-found on the first page load.
Any ways to simulate a not found page?
Thank you
Use a variadic route to catch 404:
m.route(document.body, '/', {
'/': home,
'/:any...' : notFound
})
Thank you very much!
Most helpful comment
Use a variadic route to catch 404: