Hi Shaine,
Shaine a écrit :
> I have a big problem with adding a parameter to a URL which passes via squid
> . For that i am going to use url_rewrite program. I had a big time with
> squid url rewriting, but no success.
>
> Could you please tell me , to get in to my point what are the minimum
> requirement to be satisfied ?
>
I haven't tested to rewrite the querystring part of the url, but it's
available on the redirector (rewrite_program)
Here's sample input for the rewrite_program
0
http://www.somedomain.com/thumb/100/3/b/2/7/3b279a6eab3d0a983d9tre.somedomain.com/messenger/messPing.php
12.34.56.78/- - POST -
0
http://subdom.somedomain.com/thumb/55/3/c/3/6/3c36046ed06c78b2b65627f660be6220.jpg
12.34.56.78/- - GET -
0
http://www.somedomain.com/thumb/100/3/6/8/4/3684949288972604fafdb167ffc214d5.jpg
12.34.56.78/- - GET -
0
http://www.somedomain.com/thumb/100/7/a/4/1/7a4113fd5fba8ec93fa6bf82a6c993be.jpg
12.34.56.78/- - GET -
0
http://www..somedomain.com/thumb/100/4/3/d/f/43df2ca304f508557294d3a835a6fd29.jpg
12.34.56.78/- - GET -
The digit in the first position is only present when
url_rewrite_concurrency is used, see
The thread : url_rewrite_concurrency singlethreaded redirector performance?
http://www.mail-archive.com/squid-users@squid-cache.org/msg49897.html
> url_rewrite_program
> url_rewrite_children
> url_rewrite_concurrency
> url_rewrite_host_header on|off
> url_rewrite_access allow|deny acl ...
>
I use :
url_rewrite_program /etc/squid/redirector.pl
url_rewrite_children 100
url_rewrite_concurrency 50
url_rewrite_host_header off
which means :
100 process spawned (busy proxy)
url_rewrite_concurrency 50, means squid can pass up to 50 URL to the
program using a counter
url_rewrite_host_header off, means that redirector rewrites the URL, but
squid keep the original URL, useful in accelerator mode (surrogate), See
the doc, to be sure.
> how it should like , url rewrite program ? can somebody leave me a simple
> example ?
Simple perl program :
# no buffered output, auto flush
$|=1;
while(<STDIN>)
{
s#http://something/#http://somthingelse/#;
print;
}
A bit fast answer, hope that helps.
Regards,
Sylvain.
Received on Wed Jun 11 2008 - 16:02:00 MDT
This archive was generated by hypermail 2.2.0 : Thu Jun 12 2008 - 12:00:04 MDT