Create a .htaccess file with the following values
AuthType Basic
AuthName "Massagebook"
AuthUserFile /path/.htpasswd
Require valid-user
Now create a .htpasswd file using the following command
htpasswd -c .htpasswd username
now the system will prompt for password
after giving the password, it will be encrypted and saved in a file
For windows follow the same method
but the password will not be saved in encryted form but will be saved as it is in the .htpasswd file.
No comments:
Post a Comment