0

i want to use for some website Apache password protection for an directory. This is not mine hosting so I can't look to logs or sth. So I just copied my .htacces that works just perfect on my hosting. The problem is, that I don't see any dialog box asking for login and password... Nothing... Just Blank page! Even index file doesn't work. When I have deleted .htaccess - index.php works just fine.

If it will help: I'm trying to secure subdirectory. In main directory I also have .htaccess (for mod_rewrite). In main directory everything is OK.

Here is code of .htaccess which should secure subdirectory.

AddDefaultCharset UTF-8

ErrorDoc 401 "Sorry, this is top secret zone"

AuthName "Top secret" 
AuthType Basic
AuthUserFile .htpasswd 
AuthGroupFile /dev/null 
require valid-user

Any ideas?

P.S. Ofcourse .htpasswd is in the same directory like .htaccess

marverix
  • 131
  • 1
  • 5

1 Answers1

0

You should check the permissions on the .htaccss and .htpasswd files and make sure they are readable by Apache. It looks like the "require valid-user" should be "Require valid-user".

Without error messages or output in a log file it is hard to debug.