I have a set of routes set up like the following:
routes: {
'!/home': 'home',
'!/home/:page': 'home'
}
What I'm wondering is, how do I configure a route such that if the user requests an unknown page I can easily redirect to a static 404.html page?
In your Router (the first two routes are for example):
routes: {
"path/": "objectList",
"path/:id": "objectItem",
":whatever": "notFound"
}
The last is the most general route possible, and will pick up everything not recognized by more specific routes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With