Re: [squid-users] is it possible to block search?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 4 Jun 2003 10:22:56 +0200

On Wednesday 04 June 2003 09.41, alberto wrote:

> is there any possibily to block a google search?.
> If i put into google "porn", how can i do with an acl to block the
> search? Thank you...

You can use urlpath_regex to block search queries in most search
engines.

acl search_keywords urlpath_regex -i \?.*(\+|=|%..)porn(o?)(\+|&|%|$)
\?.*(\+|=|%..)pussy(\+|&|%|$) [etc]

http_access deny search_keywords

Explanation of the regex pattern:

-i case insensitive

\? look for a ? in the URL
.* followed by any characters
(\+|=|%..) + (space) = or any %nn escape
porn(o?) porn or alternatively porno
(\+|&|%|$) followed by + (space) & (query separator)
                % (%nn escape) or nothing

Regards
Henrik

-- 
Donations welcome if you consider my Free Squid support helpful.
https://www.paypal.com/xclick/business=hno%40squid-cache.org
If you need commercial Squid support or cost effective Squid or
firewall appliances please refer to MARA Systems AB, Sweden
http://www.marasystems.com/, info@marasystems.com
Received on Wed Jun 04 2003 - 02:48:21 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:17:14 MST