Forum Discussion
stupid48
Altocumulus
Aug 12, 2015Replace multiple strings with iRule?
Hi there,
I've got an occasion to replace a few strings in an HTTP_RESPONSE. I can't seem to figure out the syntax. I've got it replacing one using STREAM::expression but I'm not sure how to do two or three distinct texts.
Thanks for any advice...
3 Replies
- VernonWells
Employee
I believe the
page provides the answer you're seeking:STREAM::expressionSpecifically, you can space-delimit replacement pairs, as in:
when HTTP_REQUEST { STREAM::disable HTTP::header remove "Accept-Encoding" } when HTTP_RESPONSE { STREAM::expression {/onething/anotherthing/ /secondthing/yetanother/} STREAM::enable } - stupid48
Altocumulus
Thanks. Sorry for wasting your time. I should have read the specs on STREAM::expression
- VernonWells
Employee
No wasted time, and I was happy to be of assistance!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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