|
VAN: Webmasters:
Accounts:
Using Password Authentication
You can restrict access to a specific directory in your
web account by creating a text file containing users and
passwords and placing it in the directory. The text file
uses an authentication process called "htaccess"
and it must be formatted in a specific manner. Also, the
file must be named .htaccess.
Fortunately, creating an .htaccess
file is quite simple if you follow these steps.
Generate the access information
In the form, below:
- Enter the user's name
- Enter the desired password
- Click on submit
- Copy the text string from the resulting page
Upload the access information
- Create a text file and paste the access string into
the file.
- Save that text file as ".htpasswd" and transfer
it (via ftp) to the directory in which you wish to protect.
For example, if you were user john and wanted to restrict
access to the web pages in the "class66/class-secrets"
directory, your .htaccess file may look like:
AuthUserFile /alum1/classes/66/class-secrets/.htpasswd
AuthName john AuthType Basicrequire valid-user
Now any pages you place in the class-secrets directory
will be protected and any user that tries to browse them
will be prompted for the user and password.
Notes:
1. .htaccess will not
work if there are extra spaces after AuthUserFile.
2. Do not use the same password as used for your club/class
account as .htaccess passwords are sent as clear text.
|