#!/usr/bin/perl # change the above path if your perl binary is elsewhere, for example # /usr/local/bin/perl # by Theo Markettos # Placed in the public domain # based on an example from the Squid FAQ $|=1; while (<>) { @X = split; $url = $X[0]; if ($url =~ /^.*\&[a-z]*;.*/) { $url =~ s/\&\;/\&/; $url =~ s/\</\/; # add other characters here # # the 301: sends a Moved Permanently message to Browse print "301:$url\n"; } else { print "$url\n"; } }