Actually, access is restricted by directory so all files in the same directory will be protected.
This file should be in the directory which contains the documents to restrict access to. The contents of this file specify the name of the password file.
For example if you were user jdoe with web documents in the local directory "/home/jdoe/public_html/goodstuff" that you wanted to restrict access to, your .htaccess might look like:
AuthUserFile /home/jdoe/public_html/goodstuff/.htpasswd
AuthName jdoe_goodstuff
AuthType Basic
<Limit GET>
require valid-user
</Limit>
Note that .htaccess will not work if there are extra spaces after AuthUserFile.
This file contains the passwords of the users.
To create the .htpasswd file log in to this server using telnet, change directory to the directory you want to restrict access to, and type:
htpasswd -c .htpasswd someuser
for the first user (where someuser is the username). You will then be prompted twice for the user's password. The -c option causes the .htpasswd file to be created. For each additional user type:
htpasswd .htpasswd someuser
|
| Call 1-800-THE-LOST if you've seen this child. Click on the image for case details. We support the work of the National Center for Missing and Exploited Children.
Click Here To Add A Missing Child Link To Your Pages! |
|
|
|
Send E-Mail to: |