[squid-users] No SSL to SSL redirection problem

From: Roberto O. Fernández Crisial <rfernandez_at_bumeran.com>
Date: Mon, 23 Feb 2009 13:24:49 -0200

Hi,

My name is Roberto and I’m a new user of the list. I having a trouble and I
want to know if you can help me with it.

I’m using Squid 2.5-STABLE14 with SSL support. I need to rewrite every url
with “http://...%93 request to “https://...%94 so I use this script at the
redirect_program line:

#!/usr/bin/perl

$|=1;

while (<>)
{
        @X = split;
        $url = $X[0];

        if ($url =~ /^http:\/\//)
        {
                $url =~ s/http/https/;
                print "301:$url\n";
                exit;
        }
        else
        {
                print "$url\n";
                exit;
        }
}

                The problem is that access.log shows every GET with
http://...%94, even after be matched with script, and makes an infinite loop
requests (the script redirects to https but the Squid take it as http and
make the redirection again). What I can do? How can I make the “http” to
“https” to work fine?

Thank you,

Roberto O. Fernández Crisial.
Received on Mon Feb 23 2009 - 15:24:50 MST

This archive was generated by hypermail 2.2.0 : Mon Feb 23 2009 - 12:00:01 MST