cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

Pool selection using I-rule or policy

Godswill
Nimbostratus
Nimbostratus

Help please with the follow irule or policy that can work for me.

 

I have one virtual server for the follow two website.

 

Client puts mcd-test.who.gov/acr -----> go to Pool pool 172.120.202.116 :7878

Client puts mcd-test.who.gov     -----> go to pool pool 172.120.202.116: 9999

 

whenever I applied the following irule to the virtual server, none of the website will load or work.

I have tried using policy and still get the same problem. Any help will be appreciated

 

when HTTP_REQUEST {

  switch [HTTP::host] {

    "mcp-test.who.gov/acr" {

      pool mcd-test.who.gov_7878_pool

    }

    "mcd-test.who.gov/acr" {

      pool mcd-test.who.gov_7878_pool

    }

  }

}

1 REPLY 1

SanjayP
MVP
MVP

Try below

 

when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "acr*" { pool mcd-test.who.gov_7878_pool } default { pool mcd-test.who.gov_9999_pool } } }