On Mon, 27 Dec 2004, R. Benjamin Kessler wrote:
> There are certain URLs that we'd like to ensure that external users are
> coming in via HTTPS. I'd like to configure a redirector such that if they
> browse to http://www.foo.com/some-path/doc.html that they get redirected to
> https://www.foo.com/some-path/doc.html instead.
>
> This seems like it would be a fairly straight-forward thing to do but I'm
> having problems. If someone could point me in the right direction that
> would be great!
Squid-2.5 is slightly confused about the requests accepted via https_port
an sees them mostly the same as if the request was accepted via an
http_port, but you can use the my_port acl to see a difference between the
two combined with deny_info to send the redirect.
acl on_port_80 my_port 80
acl https_only urlpath_regex ^/some-path/
https_access deny on_port_80 https_only
deny_info https://www.your.domain/some-path/
You can also play with the %s argument to deny_info to have the original
URL included in the redirection, but this is intended to be used for
redirecting to a cgi program etc.
deny_info https://www.your.domain/cgi-bin/https-only?url=%s
or you can use the above access controls in redirector_access to have only
"wrong" URls sent to the redirector.
Regards
Henrik
Received on Mon Dec 27 2004 - 08:50:34 MST
This archive was generated by hypermail pre-2.1.9 : Sat Jan 01 2005 - 12:00:03 MST