How to know if a page exists in middleware
Unanswered
Brown bear posted this in #help-forum
Brown bearOP
Hi! I'm currently using a middleware to catch some pages and then do a redirect to other another page. The problem is that I don't know in advance is this other page exists.
Is there a way to know if a page exists before doing the redirect in the middleware? I mean a function that list pages of the website under a specific url or something to test if that redirection will do a 404
Is there a way to know if a page exists before doing the redirect in the middleware? I mean a function that list pages of the website under a specific url or something to test if that redirection will do a 404