httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anil Dighade" <>
Subject RE: [users@httpd] Switching between HTTP and HTTPS using Rewrite Module, where Mod Proxy used for other purpose.
Date Thu, 15 Jun 2006 11:03:13 GMT

Krist, All

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

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


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


On 6/15/06, Anil Dighade <> 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  and Weblogic(on  as application
sever. So all my code deployed in weblogic server. Apache simply redirects
the request. I access site as 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
> should be rewritten as
> For HTTP Virtual Host
> RewriteEngine on
> RewriteRule ^/godzilla$     # Here
also tried ^godzilla$
> RewriteRule ^/godzilla/(isc\.*)$$1
[L] # Here also tried removed preceding /
> RewriteRule ^/godzilla/(.*)$$1 [P,L]
# Here also tried removed preceding /

You indicate above you want a redirect, ie, a browser accessing should be told to access 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\.*)$$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\.*)$$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



Bremgarten b. Bern, Switzerland


Tech Mahindra, formerly Mahindra-British Telecom.


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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message