[squid-users] Squid 3.3 to 3.5 url_rewrite_program changes

Amos Jeffries squid3 at treenet.co.nz
Tue May 19 06:05:51 UTC 2015


On 19/05/2015 12:33 p.m., PSA4444 wrote:
> I tried to upgrade from squid 3.2.x to 3.5.x and found my url rewrite script
> no longer works.
> After trial and error, I found the latest version it works in is the latest
> 3.3.x so I've upgraded to this for now.
> 
> Here is my url_rewrite_program: http://pastebin.com/uaYUCkyY
> 
> I haven't been able to figure out how to port this over to the new
> url_rewrite_program format.
> 

Take a read through <http://wiki.squid-cache.org/Features/AddonHelpers>.

Notice how the helper input and output lines have different syntax. Your
helper is just taking the input line, adjusting its URL and dumping it
straight back at Squid with all the extra input parameters. That has not
been correct operation since Squid-2.4 (when there were no extra
parameters).


Anyhow your helper is doing the equivalent of:

 acl HTTPS proto HTTPS
 acl api urlpath_regex ^/api

 acl site dstdomain site.domain.com
 deny_info 301:https://api.domain.com%R site
 http_access deny HTTPS api site

 acl site2 dstdomain site2.domain.com
 http_access deny HTTPS api site2
 deny_info 301:https://api2.domain.com%R site2


Amos



More information about the squid-users mailing list