I have password-protected the root folder of my website while i do maintenance, but I want to display a custom 401 error page to let people know the site is under construction. Unfortunately, my web host doesn't allow me write access to anything outside the root folder of my website, so this custom error page must by stored in the root folder or one of its subfolders. Instead of my custom error page I get the Apache default error page and it also says "Additionally, a 401 Authorization Required error was encountered while trying to use an ErrorDocument to handle the request."

I searched for ways to make a subfolder of a protected directory public, and all I could find was to use the "Satisfy any" directive, but this doesn't work for me. It doesn't work on a file-only basis either, as with the .htaccess file below.

#Authorization Restriction
AuthType Basic
AuthName "Access to root"
AuthUserFile *********************************
Require user ***********

Order Allow,Deny

Satisfy any

#Error Documents
ErrorDocument 401 Error-401.html

#Allow access to error documents
<Files Error-*,html>
Order Deny,Allow
Allow from all
Satisfy any
</Files>

I can only use .htaccess files; I don't have access to httpd.conf

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.