I am attempting to lock a file out for me only (it's a log, and I don't want users to see it).
This is my .htpasswd:
foo:bar
And this is my .htaccess:
AuthUserFile /home/kapip/public_html/.htpasswd
AuthType Basic
AuthName "This is allowed for admin purposes only"
<Files "users.log">
Require valid-user
</Files>
Even if I put in the correct password after the dialog, the dialog just flashes as if the request was sent, and then it pops up again. No matter what I put in, I can't see my file.
Some Specs
- I'm on shared hosting
- The .htpasswd, .htaccess, and log file are in the same directory
- Even if i change users.log to users.txt, it still doesn't work
- If I click "cancel" when it asks for credentials, it gives a 401 Response
Please help me! :(