Forum Discussion
Michael_Yates
Apr 18, 2012Nimbostratus
Hi Bertolazzi,
Try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/abc" } {
HTTP::redirect [string map {"abc" "def"} [HTTP::uri]]
}
}
This iRule some assume that you just want to replace the sub-directory "abc" with "def" and keep the rest of the HTTP::uri.
If you are needing something else just let us know.
Hope this helps.