I want to use custom error file for 403 but apache just seems to ignore the directive ErrorDocument
and just gives me the default error document. Here's the beginning of my httpd.conf
ServerRoot "C:/xampp/apache"
Listen 80
ErrorDocument 403 "/403.html"
ErrorDocument 404 "/403.html"
I just added 404
to see if it would work, it didn't. The file 403.html
exists inC:\xampp\apache\403.html
I tried moving the ErrorDocument
directive further down in the configuration file, where comments describing ErrorDocument
directive start but the result was the same.
I do not have ErrorDocument
directives in any .htaccess
files in folders that I'm testing.
Can you please tell me why apache is ignoring me?
EDIT
Just to be sure I will mention the way I'm testing this. I have a .htaccess
file in C:\xampp\htdocs
with the following contents
Order deny,allow
Allow from 127.0.0.1
Allow from ::1
Deny from all
The purpose of which is to deny access to all subfolders and files that don't explicitly allow it, and then I'm just sending a request to my public IP to get access denied.