Interesting mod_expires vs maintenance page problem
I was working with a user the other day who had a "maintenance page"
kind of configuration using an external redirect, but they also had
mod_expires configured for the application the maintenance page was
This results in temporary maintenance pages that are undesirably cacheable.
This particular users ErrorDocument for the maintenance page as they
have a handler that returns an error status. But the typical config
is something like mod_rewrite (and no roundtrip, just an internal
redirect) but this has the same result for mod_expires.
For the rewrite case, mod_expires could check for some environment
variable, then just have the rewrite users set it during the
maintenance rewrite. I don't love this for a bunch of reasons but it
is at least something. It may be possible to do this w/o a code
change by removing the expires filter but I haven't tried it -- would
like to provide a better external for it.
For the ErrorDocument case, would it be reasonable for mod_expires to
check REDIRECT_STATUS or whatever and bail out the same way it does
for actual error statuses when it's serving the 302? Or would we need
an opt-in here too?