VS Redirection from uri response
I have found problems trying to route traffic from one VS to another VS and I'm not sure how to get round it.
I have 3 url's similar to below that I want to be redirected to another VS on the ltm.
https://asite.com/eu/?state=register
https:/asite.com/au/?state=register
https://asite.com/int/?state=register
I have tried various settings in an irule as shown below but can't get it to work.
Can someone help me out?
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/register/" }{
virtual vs-abc-443
}
}
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "asite.com" and [HTTP::path] eq "/int/?state=register" } {
virtual vs-abc-443
}
}
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "register" } {
virtual vs-abc-443
}
}
when HTTP_REQUEST {
if { ([HTTP::host] eq "asite.com") && ([string tolower [HTTP::uri]] starts_with "/?state=") } {
virtual vs-abc-443
}
}