|
|
Password Protect DirectoriesAside from the redirection of error codes, the password protection and authentication systems offered by the Apache Web Server is probably the most used .htaccess feature. It's very easy to implement a requirement od a name and password to a directory or directories if you wish to do so. This will cause that little window asking for your login name and login password. First you should decide which directory (everything under it will also be blocked), and in that directory create the .htaccess file with the following information:
Just so you understand what you're doing, we will try to explain it line by line.
A sample of a .htpasswd file with 2 users could be:
One account per line, the readable names are the user names, the numbers and letters is the encrypted password. The encryption is done by the server and it's saved encrypted. To manage many users you will probably need some kind of member access program. This member access program will most likely create and handle your htaccess and htpasswd files, and will most likely have web interface. You should also look for more fields than user name and password. Something like e-mail, phone, address, country would be nice. Check out our PHP & CGI Scripts area for a few of these programs I've tried. You should know that you can manage these files manualy, but I would leave that for more advanced users. Review It
|
|
||||||||||