Redirecting Unregistered Routes?

If a user were to enter a URL that is not registered in my application as a valid route, is there a way to catch this and redirect them to a registered page?

For example, in productionMode = false, if a user were to go to a route not defined by my application, they will see the page attached. Is there a method or BeforeEnter type of call that can be done to send them to a different, registered route?

Thanks for the help in advance.
17564346.png

Hi,

If I understood correctly, I think this is what you are looking for: [Router Exception Handling]
(https://vaadin.com/docs/v12/flow/routing/tutorial-routing-exception-handling.html)

I think this is it exactly. I’ll dive further into this. Thank you!