nkroon1
Sep 19, 2019Cirrus
iRule not redirecting to pool based on User-Agent
I've been trying to figure out a solution to my current issue and haven't been able to. I'm currently trying to redirect iPhones when they attempt to access our exchange VIP and redirect them to our WAP pool. The Exchange VIP has no pools and is currently just three iRules that direct users to the correct locations based on where they are coming from. (It was built with the built in Exchange App).
From what I can tell, it appears that my iRule to redirect users will run, however they will still process all the other irules too and get redirect to exchange. I've tried stopping iRule precessing with event disable and event disable all but it doesn't seem to resolve the issue. Below is my irule.
when HTTP_REQUEST {
if { [HTTP::header User-Agent] contains "iPhone" } {
pool WAP
event disable
log local0. "Hostname: [HTTP::host] URI: [HTTP::uri] IP: [IP::client_addr] User-Agent: [HTTP::header User-Agent]"
}
else {
log local0. "Else statement ran"
return
}
}