Information technology tools and resources at the UW
Authorizing UW NetIDs by Affiliation Type
You can protect your website to restrict it to individuals with the appropriate Affiliation, such as students only, faculty only, etc (see the UW Affiliation Reference for all the possible UW affiliations associated with authorization).
Follow these steps to restrict access to a website to affiliations of type “student”. For other affiliation types, just replace “student” with “faculty”, “alum”, etc.
At the prompt, enter the following command to change directories to your Web directory:
If you want to password protect a subdirectory rather than your whole website, change directories to the subdirectory you want to protect. For example:
At the prompt, enter the following command to create a .htaccess file in the current working directory:
Add the following text to this file:
Require type student
You can also combine multiple affiliations. For instance, to allow only faculty and students access, use:
Require type faculty OR student
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 website with a Web browser.