The
string map
substitutes every instance of / for /xxxxx. Thus, if the path-uri were /, it would change the path-uri to /xxxxx. If the path-uri were /foo/bar, it would change the path-uri to /xxxxxfoo/xxxxxbar. I believe what you are attempting to do is insert a path element at the start of any submitted path-uri, so that:
Is that correct? If so, then you should be able to simply do this:
when HTTP_REQUEST {
HTTP::uri "/xxxxx[HTTP::uri]"
}
If you are using BIG-IP 11.4 or higher, you could also use a Local Traffic Policy:
ltm policy expand-path {
controls { forwarding }
requires { http }
rules {
rule01 {
actions {
0 {
http-uri
replace
path /xxxxx[HTTP::uri]
}
}
ordinal 2
}
}
strategy first-match
}