Forum Discussion
nitass
Feb 08, 2014Employee
the switch's string is set to lowercase but pattern is not.
e.g.
[root@ve11a:Active:In Sync] config tmsh list ltm rule myrule
ltm rule myrule {
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/techsupport/nontemplates/Download%20Center/DownloadCenter.aspx?Download_content=User+Manuals&download_product*" {
set newURI [string map -nocase {"/techsupport/nontemplates/Download%20Center/DownloadCenter.aspx?Download_content=User+Manuals&download_product=" "/Redirect/Content/User+Manuals/Product/"} [HTTP::uri]]
HTTP::redirect "http://[HTTP::host]$newURI"
}
}
}
}
[root@ve11a:Active:In Sync] config curl -I "http://172.28.24.10/techsupport/nontemplates/Download%20Center/DownloadCenter.aspx?Download_content=User+Manuals&download_product=A660DF1A-91FF-445B-8125-CE49DF253C64"
HTTP/1.0 302 Found
Location: http://172.28.24.10/Redirect/Content/User+Manuals/Product/A660DF1A-91FF-445B-8125-CE49DF253C64
Server: BigIP
Connection: Keep-Alive
Content-Length: 0