Follow these step-by-step instructions to password protect your website such that only people who are members of a pre-defined group in the UW Groups Service can get in.
Note: Groups with membership viewing restrictions will not work in .htaccess files, because the Web servers will not have permission to view the membership of the group. If you want to use groups with restricted memberships for website authorization, you need to add the UW Web servers to your group's list of membership viewers. You can email firstname.lastname@example.org for the current identifiers for those servers.
To provide access to members of a group by referencing its UW Group ID:
If you have not already created a group with the proper membership, use the Groups Web Service to create a group with the members you would like permitted to your site.
If you do not have any groups yet, you should be able to start by creating groups with IDs like the following:
In this group ID, uwnetid is your UW NetID. The group ID "u_uwnetid" is your home group stem. You have default permissions to create groups beginning with your home group stem. Thepurpose component of the group ID is specific to the purpose of this group. Subgroups like u_uwnetid_purpose_specific can be created for more specific groups below the original u_uwnetid_purpose group.
At the prompt, enter the following command to change directories to your Web directory:
If you want to 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 group u_netid_myteam
Substitute u_netid_myteam with the UW Group ID you want to reference for access control.
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 having someone in the referenced group open your website with a Web browser.