Archive for September 29th, 2008

Protect web pages with username/password

Monday, September 29th, 2008

If there some web pages you want to protect with username/password, all you have to do is to create a file called .htaccess under the directory to protect with the following lines: AuthUserFile /path/to/htpasswd/.htpasswd AuthGroupFile /dev/null AuthName "Restricted Directory" AuthType Basic <Limit GET POST> require valid-user </Limit> Replace /path/to/htpasswd/ with the .htpasswd path. Replace Restricted Directory with the text ...