Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've created a .htaccess and a .htpasswd file, both using my hosting's tool, uploaded them, and I get an error when I try to view the directory. Why?

my .htaccess file:

AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /home/u947248131/.htpasswd 
AuthGroupFile /dev/null 
require valid-user
share|improve this question
add comment

1 Answer

in your .htaccess file is it within

 <Directory /path/to/the/directory >
AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /home/u947248131/.htpasswd 
AuthGroupFile /dev/null 
require valid-user
</Directory>

More help http://httpd.apache.org/docs/2.2/howto/auth.html#gettingitworking

Otherwise if you can put the error log that would help

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.