Does anybody know how to make a router to catch all pages on a domain? Looking at all the documentation and API I can only see how to create a router with a prefix, so it will only check sub pages under that prefix…
Ultimately I am looking to check if a requested page exists on the domain in order to trigger custom 404 behaviour
Thank you Lee, but yes I was aware of this, and I’m looking for more flexibility and some custom code that runs. Having looked in detail, I’m not sure it is possible to have a router for ALL pages, looks like it must have a prefix & associated dynamic page, but I’d be glad for someone to correct me on that!
Hello.
I didn’t know about custom 404 page. But I think, you can use it, just run code that will redirect user to correct router url and then decide what page should be showed.
I will use this in my wix project also