How to password protect web directory
Thursday, March 2nd, 2006How to password protect web directory/folder
1. Create .htaccess file with the content below:
AuthUserFile /home/username/htdocs/.htpasswd
AuthName “Password Protected”
AuthType Basic
require valid-user
Of course in the AuthUserFile type in the location of the .htpasswd file (i.e. when you want to store that file, you’ll create it in next step)
2. Set password for the user(users) (-c option creates .htpasswd file)
If it […]