vendredi 30 octobre 2015

Password protect file within directory htaccess issue

Ok, so I've been using this to password protect my files:

<FilesMatch "visitors.log">
AuthName "no"
AuthType Basic
AuthUserFile /var/www/html/.htpasswd
require valid-user
</FilesMatch>

and this works fine in my /var/www/html (root dir for my site), but for some reason it doesn't work if i were to do the same thing but inside a directory. For example, if i were to create a .htaccess file in /var/www/html/new_directory with the same code to password a file in there, it doesn't work for some reason. Any suggestions? What am I doing wrong?

Aucun commentaire:

Enregistrer un commentaire