Forum Discussion
DB
Nimbostratus
May 11, 2007Can iRule be used to modify HTML code itself being passed?
Can iRules be used to modify the contents of an HTML page being returned to a client HTTP request? For example, if HTML page includes any link that begins with "http://images.dot.com/*" change it to "...
hoolio
Cirrostratus
Aug 20, 2007I was able to get regexes to work by wrapping the stream expression in {}'s:
This example looks for IP addresses in response content and replaces them with 0.0.0.0:
when HTTP_RESPONSE {
STREAM::enable
STREAM::expression {@\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}@0.0.0.0@}
}
Backreferences didn't seem to work though... the matched string is replaced with a literal \1.
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