This question is with respect to local host on my PC which is shared on the local network. I want selected people to access the website using .htaccess method or something similar. I used the following code for .htacces/.htpasswd method
// .htaccess file
AuthName "Realm name"
AuthType Basic
AuthUserFile .htpasswd
require valid-user
// .htpasswd file
frances:WrU808BHQai36
This method is suppose to work but it is not working for me. I once got the dialog box asking for username and password but never again? Does this method work on localhost. Note: my wordpress blog is sitting in C:\blog folder which is outside XAMPP HTDOC folder.
There were two problems that I were having. One was wrong .htaccess file, the other was wrong password encryption. After fixing this everything worked fine. Note: I visit a number of site and their encryption did not work for me.
For correct encryption for XAMPP 1.7.6, the password generated by this site worked for me but for many other it did not.
Some provided even complete htaccess and htpasswd rewrite like this one but it did not work for me.