Thread: Custom 401 page
View Single Post
  #4 (permalink)  
Old 11-14-2005, 06:46 PM
Izzee Izzee is offline
Registered User
 
Join Date: Feb 2004
Posts: 469
Izzee is on a distinguished road
Remember to flush your browser's cache when dealing with htaccess changes.

The server is not able to access the error pages in the web root directory because of the authentication issues. Try moving the 401.shtml to a non protected directory and refer to that directory in your .htaccess file.

Examples:
errordocument 401 http://protecteddomain.tld/nonprotecteddir/401.shtml
or
errordocument 401 /home/user/public_html/nonprotecteddir/401.shtml
or
errordocument 401 /unprotecteddirectory/401.shtml
etc.

Error pages have to be local and reletive or actual to the .htaccess file and not in a protected directory.

There may be other .htaccess directive work arounds like this I found in another forum I frequent:
Quote:
Custom error documents must not reside in a protected directory, or if they do, provisions must be made so that those error documents are not password-protected. An example would be to examine the requested URL and set a flag with SetEnvIf, then test that flag with Allow from (mod_access) and then use "Satisfy any" (core) so that authorization is bypassed for ErrorDocument URL requests.
Info about the SetEnvIf directive and all the rest can be found here:
http://httpd.apache.org/docs/mod/directives.html

Last edited by Izzee; 11-14-2005 at 08:25 PM. Reason: updated and added more info
Reply With Quote