I am attempting to set up htaccess to restrict access to a particular folder. I currently have as follows:
Htaccess:
AuthType Basic
AuthName "Restricted area"
AuthUserFile /home3/user/public_html/.htpasswd
require valid-user
ErrorDocument 404 "Error"
ErrorDocument 401 "Error"
ErrorDocument 403 "Error"
htpasswd:
Guest:GuestPassword
Using this method I will either have a 500 server error returned, OR it will loop and continuously prompt me for authentication.
Any help is appreciated!
ALSO: I used showphp() to get the Document root. So AuthUserFile path should be correct.
Thanks!
.htpasswd
to me.. Usually an encrypted password is added by runninghtpasswd /path/to/.htpasswd username
, have you tried that? – Wrikken Jun 3 at 22:04