Skip to content Skip to site navigation

How to Restrict Access to Webpages Using Workgroups

Individuals can use workgroups to restrict access to webpages, by naming the workgroup in a .htaccess file.

  1. Using a text editor, create a plain text file named .htaccess.
  2. Enter the following lines in the file:​
    • list all the workgroup names you want to include on the same line, each separated by a space
    • enter the complete workgroup name (stem:id), including the tilde (~) for personal workgroups
    • end with a blank line

      For example:
      ​AuthType WebAuth
      require privgroup helpdesk:consultants helpdesk:managers
  3. Transfer the file to the directory you want protected (using Dreamweaver or any other file-transfer method).
  4. When anyone attempts to access the directory containing this .htaccess file, they'll be asked to login via WebAuth. Only members of the workgroup you have entered in the .htaccess file will be given access to the directory.

System-maintained groups

There is a set of system-maintained privgroups and workgroups.

These privgroups can be used in a .htaccess file:

stanford:faculty includes regular faculty, emeritus faculty, faculty on leave, incoming faculty, faculty affiliates, and other teaching faculty; 
does not include nonactive faculty
stanford:staff includes regular staff, academic staff, staff on leave, emeritus staff, and other teaching staff; 
does not include casual staff (less than 50% time), temporary staff (less than a 6-month appointment), affiliate staff, Medical Center staff (sumc), retired staff, student staff or nonactive staff
stanford:student includes regular students, students on leave, and MLA students;
does not include NDO (non-degree option) students, incoming students, contingent students, students not registered, recent students, or nonactive students
stanford:stanford union of faculty, staff, and student groups above
stanford:academic faculty and student groups above, plus NDO (non-degree option) students, retired faculty, and academic staff
stanford:administrative faculty and staff groups above, plus retired faculty, casual staff (less than 50% time), temporary staff (less than a 6-month appointment), and sponsored affiliates (anyone sponsored for a full or base SUNet ID)
Last modified July 24, 2017