I followed simple steps to make a password protected webpage, but it does not work i.e. I can open the page from any browser and it does not ask me to login to view the page. The .htaccess file looks like this
AuthUserFile PATH/.htpasswd
AuthGroupFile /dev/null
AuthName "Please Login"
AuthType Basic
<Files "index.html">
require valid-user
</Files>
and the .htpasswd file contains username:encrypted password
UPDATE: This article helped me to fix that issue.