Re: URL substitution?

From: Simon Bryan <sbryan@dont-contact.us>
Date: Wed, 14 Jun 2000 08:06:47 +1000

Thanks Andrew and Henrik,
Small snippets like this are appreciated as I can then use my Perl reference
to 'reverse engineer' and learn more coding tricks.

Cheers,

> 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 $_;
> }
>

--
Simon Bryan                    sbryan@olmc.nsw.edu.au
Information Technology Manager sbryan@mpx.com.au
OLMC Parramatta
Received on Tue Jun 13 2000 - 16:10:06 MDT

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