Forum Discussion
4 Replies
Sort By
- richard_77048NimbostratusIf you know what the first part of the URI is, then it isn't so bad. You can grab everything after that first part of the URI with this:
- javier_diaz_379NimbostratusThanks Richard, it works perfectly
- nitassEmployeeplease feel free to revise.
[root@orchid:Active] config b virtual bar80 list virtual bar80 { destination 172.28.17.88:http ip protocol tcp rules myrule1 profiles http tcp } [root@orchid:Active] config b rule myrule1 list rule myrule1 { when HTTP_REQUEST { scan [HTTP::uri] {/%[^/]%s} para1 para2 HTTP::redirect "http://[HTTP::host]/[string tolower $para1]$para2" } } [root@orchid:Active] config curl -I http://www.foo.com/Bar/Xxxxxx HTTP/1.0 302 Found Location: http://www.foo.com/bar/Xxxxxx Server: BigIP Connection: Keep-Alive Content-Length: 0
- Brian_Deitch_11Historic F5 AccountYou can grab the 1st folder dynamically regardless of the the length:
set para1 [string tolower [URI::path [HTTP::uri] 1 1]]