Forum Discussion

Fabio_Sozzi_308's avatar
Icon for Nimbostratus rankNimbostratus
Feb 17, 2011

iRule for Find&Replace

Hi everyone,


i need to implement an irule for find a string into the HTTP Body and replace with another.


I tried to search a function to satisfies my request but i found nothing.




I tried with the String functions but i fail to replace all substring into the HTTP Body.




Can you help me please?


Thanks for any answer.








2 Replies

  • As Jason suggests, you can take a look at the STREAM::expression wiki page for examples of rewriting response content. You'll need to either disable compression on the pool members or by removing the accept-encoding request header.

    when HTTP_REQUEST {
        Remove Accept-Encoding header to prevent server response content compression
       HTTP::header remove Accept-Encoding