Forum Discussion

nkroon1's avatar
nkroon1
Icon for Cirrus rankCirrus
Sep 19, 2019

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
    }
}

2 Replies

  • Also, as a note, I removed all the additional iRules that was in the VIP and I was still unable to redirect to WAP. I'm now not sure what the issue is and why it won't send me to my WAP Pool or if the issue is with that pool and it's not accepting me correctly or something.

  • So after more troubleshooting and checking of traffic, it DOES look like the F5 is directing me to the correct pool, it's just the servers in the pool rejecting me and on the phone it just looks like a time out.