Search squid archive

squid redirect not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
    I have written redirect program which is not working.The program
is as follow:
   #!c:/perl/bin/perl.exe
$|=1;
while (<>) {
@X = split;
$url = $X[0];
if ($url !~ /^http:\/\/www\.hostname\.com/) {
$_ = $url;
s/^http:\/\/(.*)\/(.*)/http:\/\/www.hostname.com\/\2/;
print "301:$_\n";
} else {
print "$url\n";
}
}


squid config contains:
url_rewrite_program c:/squid/libexec/redirect.pl
url_rewrite_children 15
url_rewrite_concurrency 0
url_rewrite_host_header on
redirector_bypass off


Regards,
  Jayesh

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux