https://www.somesite.com/SearchResult.aspx/?search=
Should redirect to
https://somesite.com/somejsppage.jsp?kw=
is part of the sample url missing?
anyway, is it something like this?
// config
[root@ve11a:Active:In Sync] config tmsh list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 60
}
[root@ve11a:Active:In Sync] config tmsh list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
if { [HTTP::host] eq "www.somesite.com" } {
if { [HTTP::uri] starts_with "/SearchResult.aspx/?search=" } {
HTTP::redirect "http://somesite.com/somejsppage.jsp?kw=[URI::query [HTTP::uri] search]"
}
}
}
}
// test
[root@ve11a:Active:In Sync] config curl -I http://172.28.24.10/SearchResult.aspx/?search=something -H "Host: www.somesite.com"
HTTP/1.0 302 Found
Location: http://somesite.com/somejsppage.jsp?kw=something
Server: BigIP
Connection: Keep-Alive
Content-Length: 0