The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Apache::RefererBlock - block request based upon referer header

SYNOPSIS

In your Apache configuration file, add something like

        PerlModule Apache::RefererBlock
        PerlFixupHandler Apache::RefererBlock
        RefBlockMimeTypes image/gif image/jpeg
        RefBlockAllowed http://www.mydomaine.com http://mydomaine.com
        RefBlockRedirect http://www.badguyse.com http://www.badguyse.com/images/bigpicture.gif
        RefBlockRedirect http://www.realbadguyse.com http://www.xxx.xxx/samples/tts.jpg
        RefBlockDebug On

All directives are optional.

DESCRIPTION

Apache::RefererBlock will examine each request. If the MIME type of the requested file is one of those listed in RefBlockMimeTypes, it will check the request's "Referer" header. If the referrer starts with one of the strings listed in RefBlockAllowed, access is granted. Otherwise, if there's a RefBlockRedirect directive for the referrer, a redirect is issued. Otherwise, a "Forbidden" (403) error is returned.

Requests with an empty Referer header will be granted, to accomodate old browsers.

AVAILABILITY

The latest version can be fetched from <http://www.logilune.com/eric/RefererBlock.html>.

AUTHOR

Eric Cholet, <cholet@logilune.com>

COPYRIGHT

Copyright (c) 1998 Eric Cholet.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.