Password protect a directory using htaccess

This’s how you can setup password protection using .htaccess: Goto the directory that you want to be protected and create an .htaccess file there with the following contents: AuthType Basic AuthName “Attendance” AuthUserFile /home/school/.htpass/attend Require valid-user Note: Make sure that you place the AuthUserFile outside your document root to make it secure. Then create a password...

December 5th, 2009 by Akhthar Parvez