Re: [squid-users] Rewrite http to https for owa.

From: Ben Hollingsworth <ben.hollingsworth@dont-contact.us>
Date: Tue, 22 Apr 2008 12:20:49 -0500

Dwyer, Simon wrote:
> One last step to have it fully working is to rewrite address's coming in on
> http to https. This is for OWA. I have tried to use squirm and have some
> success. What I need to do is redirect http://mail.domainname.com/ to
> https://mail.domainname/com/owa. For all reverse proxy requests. Is there
> an easier way to do this? I have googled it without much success.
>

Here's how I do exactly that. In squid.conf:

    url_rewrite_program /usr/local/bin/rewrite-http

and then:

% cat /usr/local/bin/rewrite-http
#!/usr/bin/perl
#
# URL rewriter for squid to convert HTTP requests to HTTPS.
# Return an HTTP permanent redirect back to the browser.
# http://wiki.squid-cache.org/SquidFaq/SquidRedirectors
#
$| = 1;
while (<>) {
        s/^http:/301:https:/; # replace "http" with "https"
        print;
}

-- 
CONFIDENTIALITY NOTICE: This e-mail message,including any
attachments,is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is 
prohibited. If you are not the intended recipient,please
contact the sender by reply e-mail and destroy all copies
of the original message.

Received on Tue Apr 22 2008 - 17:20:58 MDT

This archive was generated by hypermail 2.2.0 : Thu May 01 2008 - 12:00:04 MDT