Forum Discussion

bigiptechie_982's avatar
Icon for Nimbostratus rankNimbostratus
Jun 10, 2012

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




if {[HTTP::path] eq "/global/en/"}{


HTTP::redirect "https://[HTTP::host]/global/en/"}





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,



1 Reply

  • Richard__Harlan's avatar
    Historic F5 Account
    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.