Use VirtualHost stanzas:
ie:
<VirtualHost _default_:80>
ServerName www.foo.com
Redirect /private https://www.foo.com/private
DocumentRoot "htdocs"
</VirtualHost>
<ifdefine SSL>
<VirtualHost _default_:443>
ServerName www.foo.com
SSLCertificateFile conf/ssl.crt/server.crt
SSLCertificateKeyFile conf/ssl.key/server.key
SSLEngine on
DocumentRoot "secure"
</VirtualHost>
</ifdefine>
David Flanigan wrote:
>Hello,
>
> My apologies if this has been discussed before, I did not turn up much in my
>archive search. I am new to modssl and to this list. Any help you can provide
>would be greatly appreciated.
>
> I have a server wide SSL certificate for my domain, but only need SSL
>support in certain areas. Is there a way to redirect non SSL requests (port
>80) for particular directories to SSL without requiring the user to to do
>anything? So automatically:
>
> http://www.foo.com/private/
>
> becomes
>
> https://www.foo.com/private
>
> I am currently using the SSLRequireSSL directive to lock out non-SSL
>connections to those directories, resulting in a error to the user.
>
> I have tried a location specific redirect like the following, but ended up
>with a loop (and a couple thousand extra entries in my log file).
>
> <Location /private>
> Redirect seeother /private https://www.foo.com/private
> </Location>
>
> Am I on the right track or making this to difficult? I have no mod-rewrite
>skills, so have not tried that route as of yet.
>
> Thanks in advance.
>--
>Kind Regards,
>David A. Flanigan ([EMAIL PROTECTED])
>
>
>
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]