Forum Discussion
hooleylist
Apr 28, 2008Cirrostratus
Hello,
With no HTTP profile, the stream profile will be applied against the full TCP payload (ie, the HTTP headers and HTTP payload). When you add an HTTP profile, LTM parses the HTTP headers and only applies the stream profile against the HTTP payload. SOL8115 (Click here) has additional detail on this.
I would guess the replacement you're trying to perform is in an HTTP header. If so, and you want to apply an HTTP profile to the VIP, you can use the HTTP::header replace command (Click here) to perform the replacement.
If the replacement is in the Location header in a redirect, you can use this rule with an HTTP profile:
when HTTP_RESPONSE {
Check if the response is a redirect
if {[HTTP::is_redirect]}{
Replace servername:portnum with servername in the Location header
HTTP::header replace Location [string map {servername:portnum servername} [HTTP::header value Location]]
}
}
If you have additional strings in the HTTP payload that you want to replace, it is more efficient to use a blank stream profile and an iRule to perform the HTTP payload replacements. To do so, you can use the STREAM::expression command (Click here). There's an example on the wiki page for the syntax.
Aaron