[Fwd: [squid-users] Always redirect a URL to a ip]

From: ROUTIER Gilles <gilles.routier@dont-contact.us>
Date: Thu, 05 Sep 2002 11:28:15 +0200

attached mail follows:


Henrik,
I made(did) what you said me.
I even tried this script but it her(it) does not always work, you have another
idea?

#!/usr/bin/perl
$|=1;
while (<>) {
s@.*mediam.*@http://55.5.20.100@;
s@.*/www.mediam.*@http://55.5.20.100@;
s@.*www.mediam/@http://55.5.20.100@;
s@.*www.mediam@55.5.20.100@;

print;} === End redirector.pl ===

Regards
Gil
Henrik Nordstrom a écrit :

> I am probably not the correct person to ask.. but I usually writes my own for
> the purpose as it is for me simpler than trying to evaluate and understand
> some other redirector.
>
> There is plenty of different redirectors listed on the related software page
> if you do not want to write your own, but writing one is not a big deal..
>
> #!/usr/bin/perl -p
> BEGIN { $|=1; }
> s%http://www.mediam([ /:])%http://55.5.20.100$1% && next;
>
> Regards
> Henrik
>
> ROUTIER Gilles wrote:
> > What redirector advise to me you ?
> >
> > Regards
> > Gil
> >
> > Henrik Nordstrom a écrit :
> > > Then use a redirector helper to Squid to rewrite the URL while it is
> > > being processed by Squid, making Squid request http://55.5.20.100/... if
> > > it received a request for http://www.mediam/...
> > >
> > > Obviously requires the browsers to know to use Squid for the requested
> > > URL.
> > >
> > > Regards
> > > Henrik
> > >
> > > ROUTIER Gilles wrote:
> > > > I preferer that Squid does it, but if the browser can do it...
> > > >
> > > > Regards Gil
> > > >
> > > > Henrik Nordstrom a écrit :
> > > > > Yes.
> > > > >
> > > > > Who do you want to perform the redirection? Squid or the browers?
> > > > >
> > > > > Regards
> > > > > Henrik
> > > > >
> > > > > ROUTIER Gilles wrote:
> > > > > > Hy,
> > > > > >
> > > > > > I wan't to redirect a url to a ip.
> > > > > > I don't want to use the DNS.
> > > > > > If URL is www.mediam => redirect to 55.5.20.100
> > > > > > It's possible with the squid.conf or the Proxy.pac ?
> > > > > >
> > > > > > Thanks
> > > > > > Gil
Received on Thu Sep 05 2002 - 03:29:35 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:10:06 MST