Forum Discussion

Srini_87152's avatar
Srini_87152
Icon for Cirrostratus rankCirrostratus
Apr 12, 2016

Irule rewrite to connect node/pool with particular path

hi Team,

Request your help for review the rule and advice.

If user access https://abc.com It should connect on back end node at https://node1.com:6443/cfcc/bclient/index.jsp/ If user access https://abc.com/cc it should connect back end node at

what i did is,created two pools, pool_6443 and pool_7443 and implemneted follwoing rule.

when HTTP_REQUEST {
    switch -glob [HTTP::uri] {
      "/cc" {
        set HTTP::uri "/cfcc/control?view=view/admin/start.jsp"
        pool pool__7443
      }
      default {
        pool pool_6443
      }
    }
}

somehow,this is not working.

6 Replies

  • Amy_123193's avatar
    Amy_123193
    Historic F5 Account

    Try using a Rewrite profile, which has similar behavior to Apache ProxyPass. You can then use the iRule just to do pool selection and pick a rewrite profile - or use an LTM Policy to select both pool and rewrite profile, which will improve performance and provide a more robust interface for configuration.

     

    • Srini_87152's avatar
      Srini_87152
      Icon for Cirrostratus rankCirrostratus
      Amy, im currently using 10.x version,so cant implement with rewrite profile.. any irules can use best approch?
    • Amy_123193's avatar
      Amy_123193
      Historic F5 Account
      Certainly. There is an iRule that implements ProxyPass functionality: https://devcentral.f5.com/s/articles/proxypass-v10-v11
  • Try using a Rewrite profile, which has similar behavior to Apache ProxyPass. You can then use the iRule just to do pool selection and pick a rewrite profile - or use an LTM Policy to select both pool and rewrite profile, which will improve performance and provide a more robust interface for configuration.