RE: [squid-users] No SSL to SSL redirection problem

From: Roberto O. Fernández Crisial <rfernandez_at_bumeran.com>
Date: Mon, 23 Feb 2009 14:08:45 -0200

JD,

        The exits are for testing and should not be at the example I wrote.

        The access.log shows (after redirection):

1235404323.937 0 200.127.215.7 TCP_MISS/301 181 GET http://xxx.yyy.com/ - NONE/- -
1235404324.445 0 200.127.215.7 TCP_MISS/301 181 GET http://xxx.yyy.com / - NONE/- -

        I do not have a line " url_rewrite_access allow !SSL_ports" I have one like this "http_access deny CONNECT !SSL_ports".

Regards,
Roberto.

-----Original Message-----
From: John Doe [mailto:jdmls_at_yahoo.com]
Sent: Lunes 23 de Febrero de 2009 13:55
To: squid-users_at_squid-cache.org
Subject: Re: [squid-users] No SSL to SSL redirection problem

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

Old version... ^_^

> #!/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;
> }
> }

I think you should remove the 2 exits...

> The problem is that access.log shows every GET with
> “http://...%e2%80%9d, 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?

What is your acl for the rewrite?
Maybe that would prevent the loops...

  url_rewrite_access allow !SSL_ports

JD

      
Received on Mon Feb 23 2009 - 16:08:51 MST

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