httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bennett Haselton <benn...@peacefire.org>
Subject Re: [users@httpd] how to make ErrorDocument apply to https:// site as well?
Date Mon, 26 Jul 2010 05:47:54 GMT
Thanks, I had actually just realized that might work :)

Yes, putting this into .htaccess does the trick:
***
<Files banned_ip.php>
allow from all
</Files>

ErrorDocument 403 /banned_ip.php
order deny,allow
deny from 71.112.32.149
***

Now the real question is why, for http requests, it allowed me to 
view the banned_ip.php error message, instead of saying that a 403 
error occurred while trying to follow the ErrorDocument 
directive.  Apparently Apache applies some different set of rules to 
the two situations, and I'll be damned if I can find anything in the 
documentation that says why the two cases would behave 
differently.  For https requests, Apache applied the .htaccess 
restrictions to the file listed in the ErrorDocument directive, and 
for https requests it didn't.

         -Bennett

At 07:33 PM 7/25/2010, Eric Covener wrote:
> > 2) in any case, if that is the cause, what would be the solution?
>
>You put a <Files> section inside of a <Directory> section and allow
>all IP addresses to access it (order deny,allow ; allow from all)
>
>--
>Eric Covener
>covener@gmail.com
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message