Forum Discussion

Vivek_Padale_16's avatar
Vivek_Padale_16
Icon for Nimbostratus rankNimbostratus
Aug 11, 2014

irule for changing server http_response from http to https

Hello,

 

I had implemented a default stream profile in Virtual server with port 80 and 443. And a per client requirement i have a redirection irule for changing http_request from http to https on Virtual server with port 80. My server is on port 80.

 

Is there any irule to change the server response from http to https and on which virtual server i have to implement server response changing irule, i mean on VIP with port 80 or 443.

 

Thank you.

 

3 Replies

  • Is there any irule to change the server response from http to https and on which virtual server i have to implement server response changing irule, i mean on VIP with port 80 or 443.

    isn't stream profile usable?

    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm profile stream mystream
    ltm profile stream mystream {
        app-service none
        defaults-from stream
        source http://
        target https://
    }
    
  • Hello nitass,

     

    I had mentioned in source tab http://abc.com and in target tab https://abc.com of my stream profile on virtual server 80 and I had also applied the below response irule for changing serv er response on virtual server with port 443:- when HTTP_REQUEST { STREAM::disable if {[HTTP::header exists "Accept-Encoding"]}{ HTTP::header remove "Accept-Encoding" } } when HTTP_RESPONSE { if {[HTTP::header value Content-Type] contains "text"}{ STREAM::expression "@http://@https://@" STREAM::enable } }

     

    After that i am able to login in to webpage but after login the webpages are not showing any content.

     

    Is there any wrong stateemnts in the above irule?

     

    Thank you