using rewrite with mod_ssl

using rewrite with mod_ssl

am 30.07.2002 18:03:43 von Peter Choe

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 modssl-users@modssl.org
Automated List Manager majordomo@modssl.org

Re: using rewrite with mod_ssl

am 30.07.2002 18:48:17 von Peter Viertel

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

Instead of:

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

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,
> 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 modssl-users@modssl.org
> Automated List Manager majordomo@modssl.org


____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org