There's a few ways to skin this depending on what you mean by "redirect". Generally when you say "redirect" with respect to HTTP traffic, you mean issuing a 30x redirect response to the user. Otherwise, you might simply mean silently changing the URI path as it flows through the proxy. The former is seen and handled by the client, whereas the latter the client doesn't see.
But I'll assume for this instance, and because it's usually better form, that you mean an actual 30x redirect.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/xxxx" {
HTTP::redirect "https://[HTTP::host]/xxxx/web/home/index.html"
}
"/yyyy" {
HTTP::redirect "https://[HTTP::host]/yyyy/forms/index.html"
}
"/xxxx*" {
pool pool_A
}
"/yyyy*" {
pool pool_B
}
}
}
The above basically says, if the URI is /xxxx or /yyyy, perform a 30x redirect to the correct URI path. If the URI starts with /xxxx or /yyyy (contains more than just that string), then send to a pool.