Forum Discussion
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
}
}
Hi Brooks,
Req : https://asite.com/eu/?state=register
uri : /eu/?state=register
path: /eu/
Can you try this iRule?
when HTTP_REQUEST { switch -glob [HTTP::uri] { "/*/?state=register" { virtual vs-abc-443 } } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com