Bug #2633
closedurl.access-deny and 404 handler
Description
Hello,
I use url.access-deny to block access for php scripts in some directories:
$HTTP["url"] =~ "/images/.*\.php$" {
url.access-deny = ( "" )
}
If I visit http://www.domain.com/images/file.php then it loads the file 404.php (404 handler). If I don't have a 404.php file then it returns "403 - Forbidden".
I believe that when you use url.access-deny it should always show "403 - Forbidden".
Kind regards,
Christos Chatzaras
Updated by CyberCr33p almost 10 years ago
This one fix it:
$HTTP["url"] =~ "/tmp/.*\.php$" {
url.access-deny = ( "" )
server.error-handler-404 = "/tmp/"
}
Updated by stbuehler almost 10 years ago
- Status changed from New to Wontfix
server.error-handler-404
has very "strange" semantics, and I'd rather not touch it. How is the handler supposed to know what triggered the 403 or 404 (it actually handles both)?
There are better ways to handle not existing files (see url.rewrite-if-not-file).
Also available in: Atom