#!/usr/bin/perl
# squid redirector plugin - save as e.g. /usr/local/sbin/fix_srw2008p
my %srw2008p = (
    '/js/initFunctions.js' => 'http://www.example.com/srw2008p/js/initFunctions.js',
    '/js/tabs.js'          => 'http://www.example.com/srw2008p/js/tabs.js',
    );
$|=1; # autoflush required
while (<>) {
    if (m!^http://192.168.1.254/([^? ]*)! && (my $r = $srw2008p{"/$1"})) {
	s!^http://192.168.1.254/([^? ]*)!$r!;
	print;
    } else {
	print "\n";
    }
}
