How to create a simple .htaccess password protection
This is how you create a simple password protection to your site. Very useful when your are in developing mode and want no one to see even the front page.
First add the following to your .htaccess file. It has to be the full path to the password file.
AuthName "By Invitation Only"
Then you create a password file named like the file referred to above .htpasswd. If you running WAMP you have to have the password in plain text. On LAMP you have to encrypt the password. Here you can make the encryption of your password.
Save it and now when you visit the site you should get an log in dialogue.
This is another version of htaccess
Deny from all
AuthName "Password Required"