referer

Top - Docs - General - Server - Resource - Access - FAQ - Tutorials

Purpose

The purpose of the referer directive is to force users to enter a document from a specified path, instead of jumping in at random. It allows the webmaster to specify an exact match or wildcard expression to match the Referer: HTTP header. See the new OnDeny directive as a way to send the browser to the correct entry point. Note: This is not perfect. There is nothing to prevent a user from accessing the directory if they are able to modify the Referer: header that is sent with their browser.

Syntax

The referer is a prefix to the standard allow and deny directives.

Virtual Host

Access control is directory based, and can only be specified as different for different hosts by using a different AccessFileName. Since the full URL is used in the referer field, you can use this to force people who are accessing the wrong site for this information to go to the virtual host instead.

Default

The default is to allow all referer fields.

Examples

<Directory /u/Web/test/referer>
<Limit GET POST>
order deny,allow
deny from all
referer allow from http://hoohoo.ncsa.uiuc.edu*/test/*
OnDeny http://hoohoo.ncsa.uiuc.edu/test/
</Limit>
</Directory>
This example limits users to entering the /u/Web/test/referer directory through the /test/ URLs. The * allows any port number or any directory beyond /test/. The OnDeny directive would then send the browser to http://hoohoo.ncsa.uiuc.edu/test/.
[Back] Return to Configuration File Overview
NCSA HTTPd Development Team / httpd@ncsa.uiuc.edu / 04-06-96