Secure Password Protection with .htaccess
You may have visited a website or two that requires a username and password to gain access. Of course, if you can’t supply these credentials, you are unable to enter the site. Webmasters do this to add security to their web pages and determine who may obtain access to certain files or aspects of their website. There are a couple of ways to go about password protecting your site. You can use a special program as well as programming languages such as PHP or Javascript. While these methods do work, the most effective way to password protect your site is with a little file known as .htaccess.
Read More on : Secure Password Protection with .htaccess