Hi. So we’re using role based redirects and JWTs to limit access to a part of our website. Basically, if someone tries to access any url staring /this-gated-section, if they have the role the redirect says to allow them in and if not we show them a log in page.
/this-gated-section/* 200! Role=user
So the redirect rule for those with the right role looks something like that ^. This all works great. The only issue I have is if someone is in the gated section and tries to go to a url that doesn’t exist. If this happens anywhere else on the site they see our 404 page. But if, for example, someone with the right role tries to go to /this-gated-section/this-page-does-not-exist - they instead see the Netlify error page. Is there anyway around this if we have the redirect rule above? There are quite a lot of pages in the gated section, so it would be cumbersome to have to list them all individually in the redirects folder - but would creating something to do that be the only way to achieve this?