Forum Discussion
Marty_Baxter_14
May 27, 2014Nimbostratus
Help modifying HTML content with an iRule
Hello,
I need help changing the HTML in the http response. Specifically in the line below I need to change the ../ to /es/aw/fleet/
I have tried the following code which did not work (no errors - but content was not modified): when HTTP_REQUEST {
disable server side compression
HTTP::header remove Accept-Encoding
disable stream for requests
STREAM::disable
}
when HTTP_RESPONSE { STREAM::enable
STREAM::expression {@../@/es/aw/Fleet/@} }
What am I doing wrong?
Thanks!
- JGCumulonimbus
Try this:
when HTTP_REQUEST { disable stream for requests STREAM::disable disable server side compression if { [HTTP::header exists "Accept-Encoding"] } { HTTP::header replace "Accept-Encoding" "" } } when HTTP_RESPONSE { STREAM::enable if { [HTTP::header value Content-Type] contains "text" }{ STREAM::expression {@\.\./@/es/aw/Fleet/@} STREAM::enable } }
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