0

I would like to protect the protect-me-dir directory with http password. I tried this code:

AuthType Basic
AuthName "restricted area"
AuthUserFile /home/iterator/public_html/protect-me-dir/.htpasswd
require valid-user

It works, but unfortunately it asks for the password everywhere, not just in protect-me-dir. How is it possible to protect only that directory?

If I put this code inside <Directory "/home/iterator/public_html/protect-me-dir">...</Directory>, I get Internal Server Error

Iter Ator
  • 8,226
  • 20
  • 73
  • 164

1 Answers1

1

Just put the .htaccess file in the directory you want to password-protect. It is a per-directory config file.

P Varga
  • 19,174
  • 12
  • 70
  • 108