This is regarding local host on my small PC that is shared around the local network. I would like selected individuals to access the web site using .htaccess method or something like that similar. I made use of the next code for .htacces/.htpasswd method

// .htaccess file
AuthName "Realm name"
AuthType Basic
AuthUserFile .htpasswd
require valid-user 


// .htpasswd file
frances:WrU808BHQai36

This process is suppose to operate but it's no longer working for me personally. I remember when i got the dialog box requesting account information but no more? Performs this method focus on localhost. Note: my wordpress blog is relaxing in C:blog folder that is outdoors XAMPP HTDOC folder.

Your browser will store your authentication on entering inside your information which means you only will have to authenticate once. To repair this, obvious your cache/snacks and you ought to get motivated for any password again.

There have been two issues that I were getting. One was wrong .htaccess file, another was wrong password file encryption. After fixing this everything labored fine. Note: I visit numerous site as well as their file encryption didn't work with me.

// 1. note the /blog/ folder needs to be there. 
// Without it, the dialog box does not pop again

AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /blog/.htpasswd 
AuthGroupFile /dev/null 
require valid-user

For correct file encryption for XAMPP 1.7.6, the password produced by this site labored for me personally however for a number of other it didn't.

Some provided even complete htaccess and htpasswd rewrite like this one but it didn't work with me.