Forum Discussion

tech_cbre_90864's avatar
Icon for Nimbostratus rankNimbostratus
Oct 11, 2011

iRule for redirecting to correct Pool or server

I am a little new to the iRule world but i am catching up fast. Here is a brief explanation .



I have 2 URLs or external hosts ( and ) both of them pointing to the Same External IP Address , let's say . This 2 URLs are being accessed by a lot of the old Mobile devices for mail purpose on EXCHANGE 2003 Server



Note: Not exchange 2010 , it is Exchange 2003



i.e -->Ext IP: --> FW NAT --> F5 --> -->Ext IP: --> FW NAT --> F5 -->



All clients traffic are using port 443 ( https ) to both URLs.



external traffic using URL are ActiveSync, OWA & RPC over Https





external traffic using URL are ActiveSync & RPC over Https but not OWA



We recently added another server to handle new mobile devices and start migrating those old mobile devices to the new infrastructure or server. -->Ext IP: --> FW NAT --> F5 -->






The traffic from the old Devices pointing to both 2 old URLs ( & ) need to be split such that All ACTIVESYNC traffic on Port 443 ( https) is redirected by F5 to the new mobile devices server ( ) . While the rest of the traffic still goes to the ( & )




How can i achieve this ? i have looked into Separate VIPs, Cookie , Http Header & irules . What is the simplest way to resolve this using irules

1 Reply

  • Hi tech_cbre,

    The hardest part of what you are trying to do is determine which traffic to route. You could use the User Agent of the devices (the old devices as you put it) to make the determination which devices need to be redirected to the new URL.

    Something like this will allow you to handle the User Agents that need to be redirected, or log the unknown User Agents.

    when HTTP_REQUEST {
        switch -glob [string tolower [HTTP::header User-Agent]] {
            "*msie*" { do something }
            "*firefox*" { do something }
            "*chrome*" { do something }
            default {
                log local0. "Unhandled User Agent: [HTTP::header User-Agent]"

    Hope this helps.