Forum Discussion

Atee_354939's avatar
Atee_354939
Icon for Nimbostratus rankNimbostratus
May 16, 2018

Redirect to different Pool based on URL

Redirect to different Pool based on URL I have 1 VIP and want to re-direct to different pool depending on the url.   abppv1-ui-qa2.apple.com:8443 should go to Pool1 abpp-notif-qa.am.tsacorp.com:84...
  • Samir_Jha_52506's avatar
    May 16, 2018

    There are many iRule available in devcentral. But I will suggest you to use f5 policy to match URI n redirect traffic to pool... Create a new policy with properties:

    Policy requires http Policy controls forwarding For each policy rule, define:

    condition : http-uri parh starts_with /bugid action : forward pool pool_x Create a default rule without conditon assigning the default pool..

    Example iRule

    when HTTP_REQUEST {
    set uri [string tolower [HTTP::path]]
    switch -glob $uri {
    
         "/book/" {
     pool pool_X
        }
         "/manage/" {
     pool pool_Y
         }
        "/checkin/" {
     pool pool_Z
            }
         }
       }