Authorizing Participants in a Course
IT Connect > Web > Publishing > Password Protection by UW NetID > Participants in a Course
Follow these step-by-step instructions to password protect your Web site such that only people registered for a specific course can get in. This type of password protection will allow you to allow only students registered for a course and the instructors of the course to view your site.
Notes:
- This type of authorization can only be used on course, faculty, staff, and departmental accounts.
- Authorization data used to authorize course groups is updated nightly.
-
Instructions
These steps show how to restrict access to a Web site so only participants in a course can access it. The most difficult part of this type of authentication is formulating the string for the 'require' directive.
- StepsActions
-
Log into your web development server using a terminal emulator. If you're not sure how to do this, click here for instructions.
-
Press the W key to drop into the Web development environment.
-
At the prompt, enter the following command to change directories to your Web directory:
cd public_html
If you want to password protect a subdirectory rather than your whole Web site, change directories to the subdirectory you want to protect. For example:
cd private
-
At the prompt, enter the following command to create a .htaccess file in the current working directory:
pico .htaccess
-
Add the following text to this file:
AuthType UWNetID
Require course AUT2009.12345The string AUT1999.5876 is composed of three parts that identify the course you want to use. The first three characters identify the quarter that the course is taught.
Quarter Three Letter Code Autumn AUT Winter WIN Spring SPR Summer SUM The next four characters are the four-digit year that the course is taught. Then there is a period to separate the part of the string that identifies the time of the course from the SLN of the course. After the period is the SLN (schedule line number) itself. You can find the SLN's for courses in the Time Schedule if you don't know them.
Note: More than one course can be listed on the same line if you want to give access to multiple courses. For example:
Require course AUT2009.12345 AUT2009.23456 AUT2009.19283
-
Save and close the file using Pico. (Click for instructions on how to use pico).
-
You're done! Confirm that password protection is working by opening your Web site with a Web browser.


