Forum Discussion

Ajac_2520's avatar
Ajac_2520
Icon for Nimbostratus rankNimbostratus
May 22, 2013

iRule replacing payload

Hi,

 

 

I have read a number of different posts on the subject, but can't get it to work.

 

All I need to do is replace http with https in a response, but no luck. I have tried some variations of iRules found here and it's possible that the "replacing"part might work but I can't get my head around the Content-lenght part.....

 

Can someone please advice.

 

 

Regards

 

A

 

3 Replies

  • I think your best bet is an iRule-based STREAM expression. The following link has an example that replaces http:// with https:// in the response.

     

     

    https://devcentral.f5.com/wiki/iRules.STREAM__expression.ashx

     

     

    The only caveat depends on which version your running. v9 and v10 require you to set the HTTP profile's Response Chunking value to "Rechunk". In v11 that is no longer required.
  • Check this example for an iRule which handles response header/payload rewriting from http:// to https://

     

     

    https://devcentral.f5.com/wiki/iRules.HTTPS-offload-rewriting.ashx

     

     

    Aaron