Oh, and I added this to my conf file:

redirect_program /etc/squid/redirect.www.pl

The perl script included below is /etc/squid/redirect.www.pl with 755 
permissions

On Thu, 16 Dec 2004 14:58:16 -0400, R. Benjamin Kessler wrote
> All -
> 
> I'm trying to configure a redirector to change certain URL's from 
> http:// to https:// and send a redirect back to the client - very 
> similar to FAQ note 
> #15.5.
> 
> I've copy/pasted the perl script in the FAQ and modified it as 
> appropriate but it doesn't seem to do anything.
> 
> What am I missing?
> 
> Thanks,
> 
> Ben
> 
> #!/usr/bin/perl
> $|=1;
>         while (<>) {
>                 @X = split;
>                 $url = $X[0];
>                if ($url =~ /^http:\/\/www\.domainname\.com\/apply/) {
>                        $url =~ s/^http/https/;
>                        print "302:$url\n";
>                 } else {
>                         print "$url\n";
>                 }
>         }




Reply via email to