Forum Discussion
hooleylist
Feb 03, 2009Cirrostratus
If you want to replace a string within the request or response payload, you can use a blank stream profile and a STREAM::expression based iRule. Set the string to replace as your string with the regex metacharacters escaped. Make sure to check the STREAM::expression wiki page (Click here) for details.
when HTTP_RESPONSE {
Disable the stream filter by default
STREAM::disable
Check if response type is text
if {[HTTP::header value Content-Type] contains "text"}{
Replace google search form with nothing
STREAM::expression {@@@}
Enable the stream filter for this response only
STREAM::enable
}
}
Aaron