I've been setting up ErrorDocuments for a website I'm working, and generally they've been working. However, after I set the 403 ErrorDocument, I noticed that it didn't work when I tried to access the .htaccess file itself. When I access a different forbidden file, the Error Document appears just fine. How can I make the ErrorDocument work on the .htaccess file?
If you didn't follow my explanation, here are links to show you what I mean:
ErrorDocument works fine: http://keycraft.haydencity.net/.ftpquota
ErrorDocument doesn't work: http://keycraft.haydencity.net/.htaccess
The .htaccess file is most likely uploaded with your user permissions, allowing it to be viewed like any other file you might upload. The
.
at the front only makes the file hidden from the standard file list, so that people don't see it listed. It does not completely forbid access to the file.Check the file's permissions and try to make them match whatever the permissions for the .ftpquota file are.
I suspect the issue is that your error document definition is in the file which is being accessed. Have you tried placing the ErrorDocument definition in an htaccess in the parent directory?