Forum Moderators: open
However, I still want my error pages, which are in a folder (we'll call it error_pages... duh) to display the appropriate error message to banned users/abusers. This doesn't happen because the banned user or bot is being shunned alltogether.
So, could I do something like:
<Files ~ "error_pages/(401\.¦403\.¦404\.¦500\.)\.*htm$">
order allow,deny
allow from all
</Files> in my .htaccess file? Sometimes my error pages end in .shtml, sometimes .htm or .html, so I need to cover those bases.
Sometimes I get a 403 (or whatever custom error page) - such as in the case of if I typed in the URL to an image file when hot-linking is denied - and other times I get the generic Apache error page - in the case of a banned user going stright to the URL - with an additional error that the custom error page could not be displayed (because the access to any files has already been denied).
Strange.
Deny to get_out is killing my custom error pages to the "get_out" IP's and I don't know a foolproof workaround.
If you have other files using the same names you might want to change the error page names to something like error404.htm
Try:
<Files ~ "^(401¦403¦404¦500)\.(shtml¦html¦htm)$">
order allow,deny
allow from all
</Files>