do you want to lower whole HTTP::path string (e.g. /myDirectory/Index.html) or only the first directory (e.g. /myDirectory/)?
whole HTTP::path string
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::query] ne "" } {
HTTP::redirect " tolower [HTTP::path]]?[HTTP::query]"
} else {
HTTP::redirect " tolower [HTTP::path]]"
}
}
}
[root@ve10:Active] config curl -I 'http://www.example.com/myDirectory/Index.html?Param1=Value1&Param2=Value2'
HTTP/1.0 302 Found
Location:
http://www.example.com/mydirectory/...am2=Value2
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
the first directory
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [scan [HTTP::path] {/%[^/]} str] == 1 } {
HTTP::redirect " map [list /${str}/ /[string tolower $str]/] [HTTP::uri]]"
}
}
}
[root@ve10:Active] config curl -I 'http://www.example.com/myDirectory/Index.html?Param1=Value1&Param2=Value2'
HTTP/1.0 302 Found
Location:
http://www.example.com/mydirectory/...am2=Value2
Server: BigIP
Connection: Keep-Alive
Content-Length: 0