Miron_du_Plessi
Oct 18, 2006Nimbostratus
HTML Content Replace
Hi,
I realize that there have been a number of conversations started enquiring about replacing content in html. As someone new to the iRules structure im looking for a simple answer to the following question:-)
If for example I want to replace recuring item in the content
"Moonshine" with "ShoeShine Cloth" the following works okay.
Although I have to add in the quotation marks because of the space between ShoesShine and Cloth.
I am uncertain however as to how I would replace another occurrence eg: Sun with Moon ; http with https etc.
If I add a second STREAM::expression statement the first one is not implemented and only the second is.
The documentation and examples on the stream commands are unfortunately someone limited.
I presume the easy way would be to create two irules but this may not be the most processor friendly.
when HTTP_RESPONSE {
STREAM::enable
STREAM::expression "@Moonshine@ShoeShine Cloth@"
Regards
Miron du Plessis