httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary W. Smith" <>
Subject [users@httpd] RewriteRule question
Date Tue, 31 May 2005 17:54:00 GMT
I have been trying to implement a restriction list on server by referrer
only.  It doesn't seem to be working.  I have a directory called restricted
that holds some PDF (as well as other) documents that I want to prevent
access to unless they have clicked the link on our site.  Most of this is
for user tracking.

I have the following rule in place:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(10\.20\.30\.40)/.*$ [NC]
RewriteRule ^/restricted/.+ - [F]

But it doesn't seem to protect anything in that directory if I just type in
the URL.  To make things a little more interesting I have two IP's on that
box.  The second IP (.41) should always get a restricted page based on the
above rules.

Can anyone obviously wrong with this?

Any help would be greatly appreciated.

Gary Smith

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message