Forum Discussion
TNY_122436
Nimbostratus
Dec 31, 2013Rewrite certain URI content
Hello, I have an existing iRule to rewrite a URI so it rewrites to something. I need to rewrite/omit a certain syntax and leave all else the same. For an example: The existing iRule is to dro...
Kevin_Stewart
Employee
Dec 31, 2013So is it a specific word, like "Today" that you need to remove, or a specific part of the URI, like the second field in the path?
If the former, then a string map would probably work.
when HTTP_REQUEST {
if { [string tolower [HTTP::URI]] contains "/today" } {
set URI [string map -nocase {"/today" ""} [HTTP::uri]]
}
}
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