You may (for whatever reason) store particularly sensitive information in your webspace. Passwords, links, and anything else.
You may want to be able to access these files by FTP for example, but do not want someone stumbling across them and being able to read or use them. Here we will deny external access to those files using a .htaccess file.
You will require that your server has the mod_access module installed for these rules to work.
In our example, we have a password file stored in /home/username/www/passwords/my-passwords.psswd
We create a .htaccess file (that is “DOT”htaccess) and within it:
<Files ~ “\.psswd$”>
Order allow,deny
Deny from all
</Files>
Save the file and upload it to the directory holding the files you wish to protect (in our case /home/username/www/passwords/ )
Simple ![]()











