Search squid archive

Re: Redirecting Based on the Referer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sön 2007-06-24 klockan 19:06 +0200 skrev Andreas Pettersson:
> Max Clark wrote:
> > Henrik,
> >
> > Can you point me to a simple example that I could work from?
>  From reading the manual I'd think something like this could work:
> 
> acl abuser referer http://www.abuser.com/abusing_link.html
> http_access deny abuser
> deny_info http://www.mysite.com/youarenotallowed.html abuser
> 
> However, the manual also states that referer is not to be trusted in all 
> cases.
> http://www.squid-cache.org/Versions/v2/2.6/cfgman/acl.html


I would do it slightly differently, allowing acceptable referer
(possibly including no referer) and denying all else.. but the principle
is the same.

acl has_referer referer_regex .
acl good_referer referer_regex -i http://www.example.com http://www.example.net
acl limited_content urlpath_regex -i /limited_directory

http_access deny limited_content has_referer !good_referer

deny_info http://www.mysite.com/no-deep-linking.html good_referer

Regards
Henrik

Attachment: signature.asc
Description: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad meddelandedel


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux