For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

zhoDroid_281800's avatar
zhoDroid_281800
Icon for Nimbostratus rankNimbostratus
10 years ago

Rule for redirrect to specific pool member

hi all i want make rule to redirect domain to specific pool member for example: i have 1 VS with 2 pool member VS : 10.10.10.1 Pool1: 192.168.1.2 Pool2: 192.168.1.2

 

if i open www.testing.com/test1 << this domain will use pool1 only and if i open www.testing.com/abc << this domain will use pool 2 only

 

thank you :D

 

4 Replies

  • Hi,

    You can use the following irule :

    when HTTP_REQUEST {
            switch [HTTP::path] {
                "/test1" {
                    pool pool1
                }
                "/abc" {
                    pool pool2
                }
            }
    }
    
    • Yann_Desmarest's avatar
      Yann_Desmarest
      Icon for Cirrus rankCirrus

      If you need to cover every path that starts with /abc or /test1 then you can change the irule to take this into account :

      when HTTP_REQUEST {
              switch -glob [HTTP::path] {
                  "/test1*" {
                      pool pool1
                  }
                  "/abc*" {
                      pool pool2
                  }
              }
      }
      
  • Hi,

    You can use the following irule :

    when HTTP_REQUEST {
            switch [HTTP::path] {
                "/test1" {
                    pool pool1
                }
                "/abc" {
                    pool pool2
                }
            }
    }
    
    • Yann_Desmarest_'s avatar
      Yann_Desmarest_
      Icon for Nacreous rankNacreous

      If you need to cover every path that starts with /abc or /test1 then you can change the irule to take this into account :

      when HTTP_REQUEST {
              switch -glob [HTTP::path] {
                  "/test1*" {
                      pool pool1
                  }
                  "/abc*" {
                      pool pool2
                  }
              }
      }