Redirecting access in Apache to https://

Ken Bradford ken at alpha2.com
Wed May 26 13:11:01 EDT 2004


I can easily block regular http access to a page (directory) by including in
my httpd.conf the following:

<Location /cgi-bin/openwebmail/>
# no non-ssl access
SSLRequireSSL
</Location>

But trying to redirect those connections to use ssl is failing. (I'm
temporarily using a test location):

<IfModule !mod_ssl.c>
# no non-ssl access
Redirect permanent /test/ https://www.alpha2.com/test/
</IfModule>

By failing, I mean I can access www.alpha2.com/test/ via http:// or https://
with no problem. Is there some other directive I should be aware of (such as
the way AllowOveride affects .htaccess)? Can anyone see a mistake? I'm just
tacking this on to the end of the conf file.

Ken Bradford
Alpha II Service, Inc.




More information about the colug mailing list