Forum Discussion
Miron_du_Plessi
Nimbostratus
Oct 18, 2006HTML 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
- hoolio
Cirrostratus
douglohf posted a solution that should work, in this thread:
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects