Re: [squid-users] Seperating request by type

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 9 Aug 2003 09:41:33 +0200

On Saturday 09 August 2003 08.35, Rully Budisatya wrote:

> I want to seperate the traffic depending on the type of document. I
> want all request which is text/html (not image or binary) always go
> direct without exception. And I want the rest which is not text to
> always go to the parent proxy which is squid2.
>
> How can I do this ?

You can't as it is impossible to know the filetype before seeing the
response, and to see the response you must first decide on where to
send the request..

You can however guess what the filetype will be based on the format of
the URL using the urlpath_regex acl type and
always_direct/cache_peer_access to control forwarding. I.e. send all
URLs ending in /, .html, .htm, .asp, .php etc directly. Some
statistics on text/html responses in your access.log should give a
good list of candidates to add to this rule.

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 Sat Aug 09 2003 - 01:42:36 MDT

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