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

can you give some example what you want to do please?

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.

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://

Aaron