Subject: Re: directing http --> https

From: "Ralf S. Engelschall" <[email-masked]>
Date: Sun, 10 Feb 2002 18:13:09 +0100

In article <[email-masked]> you wrote:
> Quoting Owen Boyle <[email-masked]>:
> 
>> If you want to be more specific so that 
>> http://d.com/foo/bar.html --> https://d.com/foo/bar.html
>> then use something like:
>> 
>> RedirectMatch (.*) https://d.com$1
>> 
> 
> Won't this create an infinate loop? 
> I could be wrong, but I think RedirectMatch will pick up the hit via http or https, and attempt to send the user to https://d.com$1 even if the user came via https in the first place.
> 
> mod_rewrite seems to be the only alternative I've seen so far. If I'm
> wrong, let me know...

Either you have to put the RedirectMatch only into the <VirtualHost> of
the HTTP-only virtual server or (in case you do it globally) you have to
use a RewriteRule with a RewriteCond which checks the %{HTTPS} variable
to avoid looping.
                                       Ralf S. Engelschall
                                       [email-masked]
                                       www.engelschall.com
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]