Hi,
I'm trying to setup a directory on a webserver that has both port 80 and
443 listening such that certain directories have authentication against an
ldap server but will only do this authentication when the current connection
is SSL. This directory will redirect to the same location with https if it
is accessed with http.
I realise I could easily put a redirect in under the virtual host however
i'm wondering if theres a much more elegant solution along these lines.
I create a .htaccess file in that directory that looks like this:
===
RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*)
https://www.somesite.com/secure-directory [R]
<**Some statement that will allow the material below to be called only if
ssl is on for this connection**>
AuthLDAPAuthoritative on
**Various LDAP authentication directives here**
</**Some statement that will allow the material below to be called only if
ssl is on for this connection**>
===
Does anyone know what I could maybe replace <**Some statement that will
allow the material below to be called only if ssl is on for this
connection**> with? I've tried <IfDefine SSL> but that defines true in
general if SSL is loaded at all, not whether the current connection is
secure.
thanks in advance,
---- Alex