Hi~
I have a squid running url_rewrite_program, but when I using
"url_rewrite_concurrency" in squid.conf, rewrite failed. The access.log
like that:
1270692467.083 0 127.0.0.1 TCP_MEM_HIT/200 29514 GET
http://drag.g1d.net/%D3%C2%B4%B3%B6%E1%C3%FC%B5%BA.mp40drag?__0.9956639306
- NONE/- text/xml "-" "Wget/1.10.2 (Red Hat modified)"
1270692470.083 32 127.0.0.1 TCP_MISS/200 29507 GET
http://drag.g1d.net/%D3%C2%B4%B3%B6%E1%C3%FC%B5%BA.mp40drag?__0.9956639
- DIRECT/119.167.214.28 text/xml "-" "Wget/1.10.2 (Red Hat modified)"
1270692476.604 32 127.0.0.1 TCP_MISS/200 29507 GET
http://drag.g1d.net/%D3%C2%B4%B3%B6%E1%C3%FC%B5%BA.mp40drag?__0.99 -
DIRECT/119.167.214.28 text/xml "-" "Wget/1.10.2 (Red Hat modified)"
My squid.conf and rewrite_program as follows:
acl rewriteurl url_regex -i ^http://drag.g1d.net/.*\.mp40drag\?
url_rewrite_access deny !rewriteurl
url_rewrite_program /home/squid/etc/redirect.pl
url_rewrite_children 5
url_rewrite_concurrency 5
#!/usr/bin/perl -wl
use strict;
$|=1;
while (<>)
{
my ($uri,$client,$ident,$method) = ( );
($uri, $client, $ident, $method) = split;
if ($uri =~m#^(.*)(\?.*)#i)
{
my ($url,$strings) = ($1,$2);
print "$url\n";
}
else
{
print "$uri\n";
}
}
Is anything wrong?