This was on Layman’s Place, my computer blog. Since I’m planning to close the blog down, I’ll be moving a few important links over to here, in case I need them later. This is one of them.
You may have a reason to password protect a folder on your website. This means that whilst the rest of your website is easily viewed by anyone, this one section of your website is only accessible by the people who have a password. There are many reasons for doing this, but the main one is privacy.
It’s easy to do. You need to create a .htaccess and a .htpasswd file. Both of these files are secure and no one else has access to them, but the passwords must be encrypted properly. If you wish to use this feature, go to Dynamic Drive’s Password Generator. There are only a few steps to work through and it’s self explanatory.
Save the file using the names given above and then upload them to your webspace using ftp (in ASCII mode). Using this method means that everything in the folder will be password protected.