Redirect user if accessing a non-existing or wrong URL path?

I’m wondering is there any method to do same thing as router for ionic to redirect user if accessing a non-existing or wrong URL path?

Duplicate at How to redirect wrong URL path