Portal Home > Knowledgebase > Articles Database > ErrorDocument 401 not working


ErrorDocument 401 not working




Posted by meduni, 06-22-2008, 12:07 AM
Hi, I have a .htaccess file with the following; ErrorDocument 401 /401.html ErrorDocument 403 /403.html My error files are located in my root web folder folder. When I browse to a password protected dir the 401.html is displayed instead of the password prompt, but if I change the .htaccess file to have; ErrorDocument 401 "my error message then I correctly get the password prompt. Can anyone suggest how to fix this? Is the problem with the path? Cheers

Posted by Barti1987, 06-22-2008, 12:32 AM
It shouldn't be. Try to remove the 403 and see what happens. Peace,

Posted by meduni, 06-22-2008, 04:21 AM
I removed the 403 line and now I am no longer prompted for a password and can access the "protected" directory. My full .htaccess file is; # BEGIN WordPress RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress IndexIgnore */* ErrorDocument 401 /401.php ErrorDocument 403 /403.php And the .htaccess in the directory I am trying to protect is; AuthUserFile /home/myusername/.htpasswd AuthName "Protected Area" AuthType Basic require user admin Is there anything obvious wrong with these files?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Mail Server Help (Views: 741)
Netelligent outage (Views: 843)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.