Forum Discussion
Nick_Matthews
Cirrus
Aug 21, 2008Search and Replace with iRule
Hi,
I am hoping someone can help.
What I want to do is search in the header for a specific user agent and then find and replace a specific word in the html. Can some one...
Nicolas_Menant
Employee
Aug 21, 2008Hi,
You can try to use the option string map
if you want to replace for example the directory "admin" by "secret"
when HTTP_REQUEST {
if {[HTTP::uri] contains "/admin/"} {
HTTP::uri [string map {"/admin/" "/secret/"} [HTTP::uri]]
}
}
HTH
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