I have an Apache config that uses legacy access rules and CGI error documents.
ErrorDocument 403 /perl/dispay.pl?page=error403
SetEnvIf User-Agent "SomeOldUserAgent" badUA
Deny from env=badUA
The blocking of the user agent works fine, but unfortunately the Deny rule also covers the generating of the error page.
I would like to exclude the error page from the blocking to provide a dynamic error message.
I have tried to allow by REDIRECT_STATUS, but this doesn't work.
SetEnvIf REDIRECT_STATUS 403 errorPage
Allow from env=errorPage
Any ideas ?