You could try to avoid rewriterule and use redirectmatch

<VirtualHost _default_:80>
RedirectMatch permanent ^/$             https://server/login.jsp
</virtualHost>

<VirtualHost _default_:443>
RedirectMatch permanent ^/$             https://server/login.jsp
</virtualHost>

----- Original Message -----
From: "Kirk Benson" <[EMAIL PROTECTED]>
To: "Modssl-Users" <[EMAIL PROTECTED]>
Sent: Wednesday, September 13, 2000 1:34 PM
Subject: rewrite-rule problem for SSL redirection


This is slightly off-topic, but I'm sure I'm not the first to want to do the
following:

I want all requests of the form http://server/ and https://server/ to be
redirected to https://server/login.jsp.  I have the following directives
within both my VirtualHosts

<Location />
RewriteEngine On
RewriteRule /$ https://%{HTTP_HOST}/login.jsp [R]
</Location>

This works fine, except that it also works for http://server/fubar/, i.e,
anything that ends with a '/'.  However, I can't find an expression that
matches the root URI.  I've tried "^/$", ^$", "^.?$" to no avail.  For some
reason, these result in a 302 return code.

Anyone have a suggestion?


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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

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

Reply via email to