This is one way you could do it.
foreach item [class match -value [HTTP::path] starts_with beginning] {
if {[HTTP::path] ends_with [class match -value $item equals ending]} {
HTTP::redirect [class match -value $item equals redirect]
return
}
}
Example: /us/e*/apple/mango/banana/grape.html
The first datagroup contains the first half of the pattern...
datagroup: beginning
/use/e "2345 4563 9546 4354"
The second datagroup contains the possible endings that match the first half. These are references by the numbers from the first half match above.
datagroup: ending
2345 /apple/mango/banana/grape.html
4563 /pear/apple/ranga.html
9564 /kiwi/fruit/toast.html
4354 /orange/orange/orange.html
The third contains the redirects for the matching pairs. I have only included one for this example.There would be at least four to match the possible endings above.
datagroup: redirect
2345
http://www.abc.com/rose/lilly/mo=ums.html
It should do what you need however you will need to test and see how well it performs for you.