http to https on one page only and redirect back from https to http for all other pages

I have two virtual servers, first one http and the second is https

Both VSs are using same http pool.

I want to redirect one page from http to https and all other site contents should remain in http.

I create the below IRule to redirect from http to https for only that page and applied in http virtual server

When HTTP_REQUEST {

if {[HTTP::path] eq “/global/en/test.page”}{

HTTP::redirect “https://[HTTP::host]/global/en/test.page”}

}

It is working fine, but I had an issue when I click on http content, the URL remains https.

The solution should redirect back from https to http for all other pages.

Thank you,

v

On the HTTPS virtual attach a iRule that does the reverse of you iRule. If it is not the URI then redirect back to HTTPS. The other way around this is with the stream profile and rewrite that one link only and leave the rest alone.