[squid-users] deny_info / url_rewrite_program

Jens Kallup jkallup at web.de
Tue Dec 1 14:17:23 UTC 2015


bellow, a Perl script that works for me - it redirect the
URL in browser; when i type in "web.de" the result is
But the browser don't connect to www.freenet.de,
he shows me a Error: redirect-error - this problem can
be, when Cookies deactivated or denied.
(iceweasel - firefox)
Is that a browser mistake or my logic?

#!/usr/bin/perl -l

$|=1;                   # don't buffer stdout

while (<>) {            # read line from STDIN (squid input)
   $url = m/^([^ ]*)/;
   if ($url !~ /^http:\/\/web\.de/) {
     print "301:http://www.freenet.de/index.html\n";
   } else {
     print "$url\n";

More information about the squid-users mailing list