Re: URL substitution?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 13 Jun 2000 09:12:33 +0200

alowe@hislora.com.au wrote:
>
> not sure... check this might get a reply.... but i think you should be
> able to if you tell one to call the other... so write a program that
> changes the url doing what you want, if it does not change, then passes
> the request on to the adzapper?

Yep, that is possible.

The following small Perl snippet should work:

#!/usr/bin/perl -n
BEGIN {
        $|=1;
        open(NEXT_REDIRECTOR,"|/usr/local/squid/bin/adzapper") || die("Cannot
start adzapper\n");
};

if (s%http://our.domain.com.au%http://192.168.3.4%) {
        print;
} else {
        print NEXT_REDIRECTOR $_;
}
Received on Tue Jun 13 2000 - 01:30:33 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:00 MST