Subject: using rewrite with mod_ssl

From: Peter Choe <[email-masked]>
Date: Tue, 30 Jul 2002 12:03:43 -0400

i have successfully limited access to a dirctory using mod_ssl.  meaning 
that the files in that directory will only show when it uses ssl 
protocol.  but when it doesn't uses ssl protocol but just, 
http://hostname/manual, it gives me a page can't be displayed message.

i thought that with the rewrite, it would automatically send it to the ssl 
protocol (https://hostname/manual).  i am wrong to think this?

this is the rewrite statement i have in my httpd.conf

RewriteCond %{SERVER_PORT}      !^443$
RewriteRule ^/manual/(.*)               https://%{SERVER_NAME}/$1 [L,R]

how can i set up my server so that when someone goes to 
http://hostname/manual, they will automatically get redirected?

Peter Choe

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

---

From: Peter Viertel <[email-masked]>
Date: Tue, 30 Jul 2002 17:48:17 +0100

If you cut and pasted that straight from your config then you have a 
typo in the rule....

Instead of:

try

RewriteCond %{SERVER_PORT}      !^443$
RewriteRule ^/(manual/.*)               https://%{SERVER_NAME}/$1 [L,R]

Peter Choe wrote:

> i have successfully limited access to a dirctory using mod_ssl.  
> meaning that the files in that directory will only show when it uses 
> ssl protocol.  but when it doesn't uses ssl protocol but just, 
> i thought that with the rewrite, it would automatically send it to the 
> ssl protocol (https://hostname/manual).  i am wrong to think this?
>