Creation of directory protection

To create a protection for directory you have to set a file .htaccess. The related password file is .htusers and contains the user name and the coded password.


If you would like to have in addition to the password's query an access constraint for computer names or IP addresses, you have to add following lines:

For Apache 2.2 (web-std + web-std2)
For Apache 2.4+ (web-std3 + web-std4)

The line allow from respectively require host causes that you can only access to the subdirectory in the RWTH network. (more information e.g. at SELFHTML)

To have more than one person access authorized, the instruction is:


require user Peter Paul Rubens

or for all users who are listed in .htusers

require valid-user

Absolute path

To make out the absolute path of your website:

  1. Create a new .php file in the directory in which .htusers is located.
  2. Copy the following lines in this file:

  3. Upload the file call up the file in your browser.

The browser's output should look like this:


AuthUserFile /e/fxx/home/websites/name/v-schutz/.htusers

This line will be inserted in the .htaccess file.