Wednesday, January 14, 2009

Webpage Password Protection (.htaccess)

Edit the .htaccess file and add these lines to it:

AuthName "Member's Area Name"
AuthUserFile /full/path/to/.htpasswd
AuthType Basic
require valid-user

Change the file mode:

chmod 755 .htaccess

Go to this site http://www.kxs.net/support/htaccess_pw.html and generate your encrypted password.

Copy and paste it to .htpasswd file (It's recommended that, you create this file in another directory).

Go to web page, you must give your username and password to enter it!

No comments: