Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology

if else statement of XML content routing not working


I have an XML profile attached to a VS. Below is the iRule attached the to VS:

    for {set i 0} { $i < $XML_count } {incr i} {
    log local0. $XML_queries($i)
    log local0. $XML_values($i)
    if {($XML_queries($i) contains "MobileNumber")} { 
      if {($XML_values($i) eq "123456789")} {
     pool Pool1
  else {
     pool [LB::server pool]

The iRule is only working if the $XML_values($i) eq 123456789, any traffic with a different mobileNumber will NOT be directed to the default pool i.e pool [LB::server pool] . The VS has a default pool. So its like the else statement is not working. Any idea why it might not be working?

Rate this Question

Answers to this Question