Forum Discussion
debo_nair_57395
May 23, 2012Nimbostratus
String replace question on [HTTP::path] help !!
Folks sorry if this is too simple of a question to ask but I just started on irules a few months back. I have [HTTP::path] = /intl/es_US/hotels/hotelsLanding and want to repla...
Michael_Yates
May 23, 2012Nimbostratus
Hi debo_nair,
You didn't specify if you wanted to perform a redirect after you made the modification, if you do then you could do something like this:
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] starts_with "/abc" } {
HTTP::redirect [string map {"abc" "def"} [HTTP::uri]]
}
}
Hope this helps.
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