Hi all,

 

I'm using mod_proxy balancer with tomcat and apache.

I used mod_rewrite to switch between http and https

 

When I have the pattern /nossl ==> I want to redirect to http
When I have the pattern /ssl   ==> I want to redirect to https

 

so I write the following rules:

 

RewriteEngine On
RewriteLog logs/webserver1/rewrite_log
#
RewriteCond %{HTTP_HOST} ^webserver1.*
RewriteCond %{HTTP} =on
RewriteCond %{SERVER_PORT} ^80

RewriteRule ^/nossl(.*)    /balancer/nossl$1 [P,QSA,L]
RewriteRule ^/ssl(.*)$     https://%{SERVER_NAME}:443/ssl$1 [NC,L]
#
#
RewriteCond %{HTTP_HOST} ^webserver1.*
RewriteCond %{HTTPS} =on
RewriteCond %{SERVER_PORT} ^443
RewriteRule ^/ssl(.*)      /balancer/ssl$1 [P,QSA,L]
RewriteRule ^/nossl(.*)$   http://%{SERVER_NAME}:80/nossl$1 [NC,L]
#

Is there something wrong, because it doesn't work

 

thanks for help.

Inas.

_________________________________________________________________
Découvrez tout ce que Windows Live a à vous apporter !
http://www.microsoft.com/windows/windowslive/

Reply via email to