Forum Discussion
Nicolas_MENOUX_
Nimbostratus
Apr 29, 2009STREAM_MATCHED for regexp replace ?
Hi,
I'm using an IRule to replace Http content coming from our web servers in order to change image relative path to absolute path as described below :
when HTTP_REQUEST ...
hoolio
Cirrostratus
Apr 29, 2009Hi Nicolas,
The curly braces should prevent expansion of variables and interpretation of meta-characters (Click here). Also, due to a bug, you always ensure that double forward slashes (like those in http://) are enclosed in double quotes. And make sure to escape the periods or I think they'll be interpreted as a character repeat in a regex fashion:
STREAM::expression "@'/images/@'http://media\.$host\.com/images/@"
You only need to use STREAM_MATCHED if you want to log the match or modify the replacement strings.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
