Forum Discussion
Greg_91698
Mar 09, 2011Nimbostratus
iRule only runs once
I have a BigIP 3400 running BIG-IP 9.4.8 Build 355.0 Final. I am trying to do some payload replacement. I contacted tech support and they told me to ask here. I would have thought they would know ...
Hi Greg,
Sorry to hear that you haven't been able to get concrete help with this yet. As Claud said, I would actually suggest you go back to the stream profile option and use a STREAM::expression based iRule to do this replacement in the HTTP response payloads.
http://devcentral.f5.com/wiki/default.aspx/iRules/stream__expression
You don't need to do the HTTP request payload collection in his example. But the response stream profile config should work well:
Example which replaces http:// with https:// in response content
Prevents server compression in responses
when HTTP_REQUEST {
Disable the stream filter for all requests
STREAM::disable
LTM does not uncompress response content, so if the server has compression enabled
and it cannot be disabled on the server, we can prevent the server from
sending a compressed response by removing the compression offerings from the client
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
Check if response type is text
if {[HTTP::header value Content-Type] contains "text"}{
Replace www.xyz.com with www3.xyz.com
STREAM::expression {@www\.xyz\.com@www3.xyz.com@}
Enable the stream filter for this response only
STREAM::enable
}
}
Aaron
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