Forum Discussion

nyamuthulla_sha's avatar
nyamuthulla_sha
Icon for Nimbostratus rankNimbostratus
Feb 09, 2018

urgent --> Irule with uri and available pool members is not acceptting due to syntax error

Hi All, I need a help in fixing the syntax in below irule.

 

when HTTP_REQUEST { if { [HTTP::uri] starts_with "/TEST" } { if { (active_members POOL-2 == 0) {

 

HTTP::respond 404

 

} else { HTTP::respond 200 } } } }

 

  • when HTTP_REQUEST {
        if { [HTTP::uri] starts_with "/TEST" } { 
            if { ([active_members POOL-2] == 0) } {
                HTTP::respond 404 
            } else { 
                HTTP::respond 200 
            } 
        }
    }