RE: [users@httpd] Rewrite and https

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...

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.

-ascs

-----Original Message-----
From: Krist van Besien [mailto:krist.vanbesien@xxxxxxxxx] 
Sent: Wednesday, August 03, 2005 3:17 PM
To: users@xxxxxxxxxxxxxxxx
Subject: [users@httpd] Rewrite and https

Hello,

I have a an apache server that proxies requests to a weblogic server that is itself not visible from the web. The apache server serves requests in both http and https.

What I want is to pass a parameter back to the weblogic server so that it knows if a request was originally http or https, so it can make the correct redirects etc...

So I have the following in my rewrite rulses:



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

This doesn't seem to work though. This is what I see in the rewritelog when I request /Portal?cmd=login using https:

(3) applying pattern '^/([Pp]ortal.*)' to uri '/Portal'
(4) RewriteCond: input='' pattern='on' => not-matched

It apears that the environment variable HTTPS is not set, even though the request is via https.

What have I forgotton?

Krist
--
krist.vanbesien@xxxxxxxxx
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: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
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: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux