Limit access to specific computers AND require a password



Last revision July 10, 2009

Access Control Table of Contents:
  1. Introduction
  2. By SUNet ID
  3. By Computer
  4. By Local Password
  5. By Computer and Password
  6. By Computer or Password

You can limit web browser access to the pages in a folder so that the viewer must be using a certain computer (such as "any computer at Stanford") and he must provide a valid user name and password that you create. All you have to do is create an .htaccess file in the folder to be protected, using both sets of directives shown in the sections on limit access to specific computers and limit access by requiring a password. If both sets of directives are found in this file, the default behavior of the web server is to make sure that the viewer who wants access satisfies both sets of requirements.

Comments or Questions?