tuckey urlrewritefilter problem for https to http redirection

2.6k Views Asked by At

I want to redirect to HTTPS for all but 3 URLs. The redirect to HTTPS is working fine, but the redirect rule from HTTPS to HTTP is not .. here it is :

<rule>
    <condition type="scheme" operator="equal">^https$</condition>
    <from>!/(signin|bank|profile)</from>
    <to type="permanent-redirect" last="true">http://%{server-name}%{request-uri}</to>
</rule>

I also tried to put this condition which did not work:

<condition type="path-info" operator="notequal">/(signin|bank|profile)</condition>

It used to work fine with this mod_rewrite rule:

RewriteCond   %{HTTPS} on
RewriteRule !^(signin|bank|profile)(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R]

But I am unable to find the equivalent rule in tuckey urlrewrite filter.

What is it that could go wrong?

1

There are 1 best solutions below

0
On

Try the condition with "request-uri" insted of "path-info"