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@xxxxxxxxx] Sent: Lunes 23 de Febrero de 2009 13:55 To: squid-users@xxxxxxxxxxxxxxx Subject: Re: No SSL to SSL redirection problem > I’m using Squid 2.5-STABLE14 with SSL support. I need to rewrite every url > with “http://...“; request to “https://...”; 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://...”;, 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