I added the .htaccess file to the folder to make it password protected. I would like to prevent all users from reading this .htaccess file, since it shows the location of my .htpasswd (I do not have permissions on this server to put this file outside the html tree).
I tried the suggestions http://www.javascriptkit.com/howto/htaccess8.shtml , but I can still read my .htaccess in a web browser. Here is my .htaccess:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/www/users/mylogin/HTML/some_hidden_dir/.htpasswd
AuthGroupFile /dev/null
require valid-user
<Files .htaccess>
order allow,deny
deny from all
</Files>
What am I missing?
source
share