Hi All,

I need some help with the Mod_Rewrite module.

I need to redirect all http calls to https for a specific hostname only.

The httpd.conf file is something like:


<VirtualHost A.com:80>
  DocumentRoot  /docs/A
 ...
</VirtualHost>

<VirtualHost B.com:80>
  DocumentRoot  /docs/B
 ...
</VirtualHost>

<VirtualHost C.com:80>
  DocumentRoot  /docs/C
 ...
</VirtualHost>

<Directory "/docs/D">
        AllowOverride None

        AuthName "D.com"
        AuthType Basic
        AuthLDAPAuthoritative on
        AuthLDAPBindDN [EMAIL PROTECTED]
        AuthLDAPBindPassword SS0-query

        Order deny,allow
        deny from all
        allow from all
        Satisfy all
</Directory>


<VirtualHost D.com:80>
  ServerName    D.com
  Redirect      / https://D.com/
</VirtualHost>

<VirtualHost D:443>
  ServerName    D.com
  DocumentRoot  /docs/D
  SSL stuff
</VirtualHost>

EOF

The above works fine for redirecting http://D.com/docs/D --->
https://D.com/docs/D

I want to extend it so:

I want to allow some directories such as /docs/A, /docs/B, /docs/C
simple http access. These are enabled by the VirtualHosts A.com, B.com,
C.com.  All other directories I want to be made available only via
https.

Original call                   Redirected call

http://D.com/docs/D  --->       https://D.com/docs/D
http://D.com/ZZZ     --->     https://D.com/ZZZ
http://A.com/docs/D  --->       rejected


Any help appreciated.  Thanks.

Farooq Khan



-----------------------------------------------------------------
This message is for the designated recipient only and may contain
privileged or confidential information. If you have received it
in error, please notify the sender immediately and delete the 
original. Any other use of the email by you is prohibited.

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to