You learn stuff every day... Thanks for taking the time to fill in the gaps.

 WRT to the order in which rewrite rules are executed, you can add the 
following directive to the VH:

RewriteOptions inherit

Then you can add the rewrite rules that should be executed after the rewrite 
rules in the main server, below that.

-ascs

-----Original Message-----
From: Krist van Besien [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 04, 2005 11:22 AM
To: [email protected]
Subject: Re: [EMAIL PROTECTED] Rewrite and https

On 8/4/05, Axel-Stéphane  SMORGRAV
<[EMAIL PROTECTED]> wrote:
> One thought at first: Couldn't your Weblogic server return a relative URL 
> rather than an absolute one, i.e. a URL not containing protocol and server 
> address ? Then this problem would not occur at all...


The problem is not only returning proper URLs but telling the weblogic server 
that a request came in over https.

> OK. You probably have one virtual host handling the SSL traffic, the 
> one with "SSLEngine On", right? You know that all requests handled by 
> that virtual host is HTTPS, right? So you do not need the condition 
> (RewriteCond). Why don't you just do either
> 
> Header set protocol https
> 
> or, if you absolutely want to use rewrite rules
> 
> RewriteRule ^(/[Pp]ortal.*)     $1?protocol=https       [QSA]
> 
> I think that you will have to use different Java methods to retrieve the 
> header in the two above cases.

I am not the one that decides which java method will be used, and the powers 
that do decide about this have allready decided that they whant the argument 
"protocol=https"  added... So I have no option but to add it...

An extra problem I have is that I have about a hundred rewrite rules, and the 
order they are porcessed in is important. I don't know how to add a rule to the 
 SSL virtual host, and maintain the processing order I want. And I also don't 
want to maintain two complete sets of rules...

I have now found out why it wouldn't work though. This is a bug in the 
mod_rewrite shipped with apache 2.0. It definitely exists in 2.0.50, but has 
aparently been fixed now. I'll upgrade when possible. In the mean time the 
folowing workaround worked for me:

 # If Portal is accessed over https add a query parameter so the portal knows.
        RewriteCond     %{LA-U:ENV:HTTPS}        on
        RewriteRule ^/([Pp]ortal.*)     $1?protocol=https       [QSA]

Krist











--
[EMAIL PROTECTED]
Solothurn, Switzerland

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to