My v1 config had the following rewrite directive
rewrite app/(.*).php app/403.html
that would match any PHP file located under /app or any of its subdirectories.
In v2, this doesn’t work for subdirectories.
A quick solution is to hardcode subdirectories with wildcards, like this:
rewrite /app/*.php /app/403.html
rewrite /app/*/*.php /app/403.html
rewrite /app/*/*/*.php /app/403.html
But this doesn’t seem practical. Is there a regex I’m missing?