- The first line needs to be a full path to the htpasswd file in your directory. (If you don't know the full path of the directory you are in, you can type pwd to see the current directory.
- The third line (AuthName) is for defining a realm. It is NOT the username. Enter a name that describes the area or directory on your site that the user is logging into. If you set up other pages/areas with the same realm users will not have to re-enter their password.
- line 5 should be replaced with the username you want to require. This should correspond to the entry you set up in your htpasswd file.
Testing the Directory Access
Now you can go to your web browser and see if your .htaccess file works.
- Enter a url in your directory. For example, you could enter
http://gladstone.uoregon.edu/~username/111/
Your browser will prompt you to enter the username and password.
- Enter the username and password that you set up in the first part of
this exercise (username: 111, password: digits 3-5 of your student id #.) and click OK.
If you are successful, you will see the web page you were trying to access. If you get an error message, make sure you entered the name and password correctly, and check that the .htaccess file contains the correct username in the require user line.
[CC Home Page | Computing Resources | Can't Find It?]
