RE: [users@httpd] Switching between HTTP and HTTPS using Rewrite Module, where Mod Proxy used for other purpose.

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

 



Krist, All

Thanks for the observations!!! I shall implement those. 

Both the options aren't working. Both the options take base as
"http://182.24.116.157:7333/";  and not the next level \bas\. If I put URL as
http://182.24.116.157:7333/BIRGetMyPAge.do then is shows rewrite log entry
for this access. I need \bas\BIRGetMyPAge.do to work.
Any Comments

Regards,
DAnil

-----Original Message-----
From: Krist van Besien [mailto:krist.vanbesien@xxxxxxxxx] 
Sent: Thursday, June 15, 2006 2:28 PM
To: users@xxxxxxxxxxxxxxxx; danil@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] Switching between HTTP and HTTPS using Rewrite
Module, where Mod Proxy used for other purpose.

Hello,

On 6/15/06, Anil Dighade <danil@xxxxxxxxxxxxxxxx> wrote:

> I am trying to Switch protocol between HTTP and HTTPS using Rewrite
Module. Little background before I start problem. I use Apache as web
sever(on 182.24.116.157)  and Weblogic(on 182.24.226.59)  as application
sever. So all my code deployed in weblogic server. Apache simply redirects
the request. I access site as http://182.24.116.157:7333/godzilla/ where
"godzilla" is name of deployed .war file in weblogic To enable switching
between HTTP and HTTPS I used below rewrite rule but this isn't working. I
want to redirect all the pages which start with "isc" on to HTTPS for
example below
>
> http://182.24.116.157:7333/godzilla/iscmypage should be rewritten as
https://182.24.116.157:7334/godzilla/iscmypage
>
>
>
> For HTTP Virtual Host
>
> RewriteEngine on
>
> RewriteRule ^/godzilla$ http://182.24.116.157:7333/godzilla/     # Here
also tried ^godzilla$
>
> RewriteRule ^/godzilla/(isc\.*)$ https://182.24.116.157:7334/godzilla/$1
[L] # Here also tried removed preceding /
>
> RewriteRule ^/godzilla/(.*)$ http://182.24.116.157:7333/godzilla/$1 [P,L]
# Here also tried removed preceding /


You indicate above you want a redirect, ie, a browser accessing
http://182.24.116.157:7333/godzilla/iscmypage should be told to access
https://182.24.116.157:7334/godzilla/iscmypage in stead. Am i correct?

You can do this several ways. One is with a rewrite rule, but you need
to add the R flag. Like this:
RewriteRule ^/godzilla/(isc\.*)$ https://182.24.116.157:7334/godzilla/$1 [R]

This will cause the server to send a redirect response to the browser.

Another way is to use the  Redirect directive:

RedirectMatch /godzilla/(isc\.*)$ https://182.24.116.157:7334/godzilla/$1

You http config btw contains a lot that is (in my opinion) unecessary.

- You cannot have ssl namevirtualhosts
- You have alias and proxy statements for the same URLs. What do you
want your server to do?

So try to simplify your httpd.config somewhat.
- Since your app lives on another server you certainly don't need the
"Alias /Godzilla/ ... " lines.
- You only need the redirect or rewrite statement in your http host,
not in your https host.
- The proxy statements you only want in the https host, not in your http
host.

HTH,

Krist

-- 
krist.vanbesien@xxxxxxxxx
Bremgarten b. Bern, Switzerland


============================================================================================================================

Tech Mahindra, formerly Mahindra-British Telecom.
 

Disclaimer:


The contents of this E-mail (including the contents of the enclosure(s) or attachment(s) if any) are privileged and confidential material of Tech Mahindra and should not be disclosed to, used by or copied in any manner by anyone other than the intended addressee(s). In case you are not the desired addressee, you should delete this message and/or re-direct it to the sender. The views expressed in this E-mail message (including the enclosure(s) or attachment(s) if any) are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Tech Mahindra.


This e-mail message including attachment/(s), if any, is believed to be free of any virus. However, it is the responsibility of the recipient to ensure that it is virus free and Tech Mahindra is not responsible for any loss or damage arising in any way from its use.

============================================================================================================================

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