Skip Navigation
IT Connect
Connecting You to Information Technology at the UW

 

Authorizing UW NetIDs by Affiliation Type

IT Connect > Web > Publishing > Password Protection by UW NetID > By Affiliation

Introduction

You can protect your Web site 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).

Instructions

Follow these steps to restrict access to a Web site to affiliations of type "student". For other affiliation types, just replace "student" with "faculty", "alum", etc.

  1. StepsActions
  2. Log into your web development server using a terminal emulator. If you're not sure how to do this, click here for instructions.

  3. 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
  4. At the prompt, enter the following command to create a .htaccess file in the current working directory:

    pico .htaccess
  5. Add the following text to this file:

    AuthType UWNetID
    Require type student

    You can also combine multiple affiliations. For instance, to allow only faculty and students access, use:

    AuthType UWNetID
    Require type faculty OR student
  6. Save and close the file using Pico. (Click for instructions on how to use pico).

  7. You're done! Confirm that password protection is working by opening your Web site with a Web browser.