Simple question really.
After an internal redirect, the original 'context' is gone. I'd like to know if there is a variable or flag that allows me to check against the original request instead of the rewritten request. Pseudo code:
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .+ public/$0.html [L] RewriteCond %{WHAT_USER_TYPED} ^public/(.+)\.html RewriteRule .+ - [R=404,L] In this example, when I type mywebsite.com/slug the request gets rewritten to path public/slug.html. Now, an internal redirect occurs and my path might match the second condition public/(.+)\.html, and returns a 404. That's not what I want. So, I'd like to know if there is some kind of solution to this.