[SQU] Fwd: Help regarding squid redirector

From: SHUVENDU DANG <shuvendu_dang@dont-contact.us>
Date: Tue, 19 Sep 2000 02:03:40 -0700 (PDT)

> I'm facing problems in setting the squid redirector.
> Where does the redirector read the input from and where does it write its
> output to? Means how do squid and the redirector communicate with each other?
>
> Here is the redirector.pl file
> I also have a redir file from which I created a redir.db file using makemao.
>
********************************************************************************
> #!/usr/bin/perl -w
> use DB_File;
> use Fcntl;
> $|=1;
> $redir_file = '/home/sk113265/squid/bin/redir.db' ;
> tie (%redir_db, 'DB_File', $redir_file, O_RDONLY, 0644, $DB_HASH) || die
> ("Cannot open $redir_file");
> while (<>) {
> chop ;
> # URL ip-address/fqdn ident method
> ($url,$address,$ident,$method) = /(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/ ;
> foreach $key (keys %redir_db) {
> if ($url =~ s/$key/$redir_db{$key}/i) {
> #print "$key\n";
> print $url ;
> last ;
> }
>
> }
>
> print "\n";
>
> }
>
> untie %redir_db;
>
>
********************************************************************************I'll
also like to join the mailing list

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Tue Sep 19 2000 - 03:07:55 MDT

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