paulfish
Sep 01, 2015Nimbostratus
Remove first element of uri
Hi,
I'm looking to remove the first element of a URI.
This is what I got from searching this site and it works.
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/css" } { HTTP::uri [string map {"/css/" "/"} [HTTP::uri]] } }
I have to write a specific rule for every branch in the system ie
/css /apps /containers
Each branch goes to a separate pool and the web developers want to start at / rather than /css in each of the examples.
Is there a way to read the first element of the uri and then remove it in the rule. One rule will work with every branch.
Thanks