Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 2803 invoked from network); 1 Apr 2009 15:20:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2009 15:20:11 -0000 Received: (qmail 70845 invoked by uid 500); 1 Apr 2009 15:20:06 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 70824 invoked by uid 500); 1 Apr 2009 15:20:06 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 70815 invoked by uid 99); 1 Apr 2009 15:20:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 15:20:06 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mezghena@hotmail.com designates 65.54.246.83 as permitted sender) Received: from [65.54.246.83] (HELO bay0-omc1-s11.bay0.hotmail.com) (65.54.246.83) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 15:19:56 +0000 Received: from BAY116-W23 ([64.4.38.123]) by bay0-omc1-s11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 1 Apr 2009 08:19:35 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_8fb85fa8-c7c9-4dc8-994d-d16c0377ca61_" X-Originating-IP: [207.61.145.4] From: inas inassen To: Date: Wed, 1 Apr 2009 15:19:35 +0000 Importance: Normal In-Reply-To: <1238597894.24434.9.camel@zeus> References: <1238537418.11265.11.camel@zeus> <4ad871310903311514n5057d16bldec33156183b85c@mail.gmail.com> <1238597894.24434.9.camel@zeus> MIME-Version: 1.0 X-OriginalArrivalTime: 01 Apr 2009 15:19:35.0241 (UTC) FILETIME=[43D66390:01C9B2DD] X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Switching between http and https --_8fb85fa8-c7c9-4dc8-994d-d16c0377ca61_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all=2C =20 I'm using mod_proxy balancer with tomcat and apache. I used mod_rewrite to switch between http and https =20 When I have the pattern /nossl =3D=3D> I want to redirect to http When I have the pattern /ssl =3D=3D> I want to redirect to https =20 so I write the following rules: =20 RewriteEngine On RewriteLog logs/webserver1/rewrite_log # RewriteCond %{HTTP_HOST} ^webserver1.* RewriteCond %{HTTP} =3Don RewriteCond %{SERVER_PORT} ^80 RewriteRule ^/nossl(.*) /balancer/nossl$1 [P=2CQSA=2CL] RewriteRule ^/ssl(.*)$ https://%{SERVER_NAME}:443/ssl$1 [NC=2CL] # # RewriteCond %{HTTP_HOST} ^webserver1.* RewriteCond %{HTTPS} =3Don RewriteCond %{SERVER_PORT} ^443 RewriteRule ^/ssl(.*) /balancer/ssl$1 [P=2CQSA=2CL] RewriteRule ^/nossl(.*)$ http://%{SERVER_NAME}:80/nossl$1 [NC=2CL] # Is there something wrong=2C because it doesn't work =20 thanks for help. Inas. _________________________________________________________________ D=E9couvrez tout ce que Windows Live a =E0 vous apporter ! http://www.microsoft.com/windows/windowslive/= --_8fb85fa8-c7c9-4dc8-994d-d16c0377ca61_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all=2C
 =3B
I'm using mod_proxy balancer with tomcat and apache.
I used =3Bmod_rewrite to switch between http and https
 =3B
When I have the pattern /nossl =3D=3D>=3B I want to redirect to http
W= hen I have the pattern /ssl =3B =3B =3D=3D>=3B I want to redirect= to https
 =3B
so I write the following rules:
 =3B
RewriteEngine On
RewriteLog logs/webserver1/rewrite_log
#
RewriteC= ond %{HTTP_HOST} ^webserver1.*
RewriteCond %{HTTP} =3Don
RewriteCond = %{SERVER_PORT} ^80
RewriteRule ^/nossl(.*) =3B =3B =3B /balancer/nossl$1 [P=2CQSA= =2CL]
RewriteRule ^/ssl(.*)$ =3B =3B =3B =3B https://%{SERVER_NAME}:443/ssl$1 [NC= =2CL]
#
#
RewriteCond %{HTTP_HOST} ^webserver1.*
RewriteCond %{= HTTPS} =3Don
RewriteCond %{SERVER_PORT} ^443
RewriteRule ^/ssl(.*)&nb= sp=3B =3B =3B =3B =3B /balancer/ssl$1 [P=2CQSA=2CL]
Rewr= iteRule ^/nossl(.*)$ =3B =3B http://%{SERVER_NAME}:80/nossl$1 [NC=2CL]
#
Is there something wrong=2C because it doesn't work
 =3B
thanks for help.
Inas.


D=E9couvrez tout ce que Windows Live a =E0 vous apport= er ! = --_8fb85fa8-c7c9-4dc8-994d-d16c0377ca61_--