Forum Discussion
Tuso_373397
Nimbostratus
Dec 17, 2018if else statement of XML content routing not working
Hi
I have an XML profile attached to a VS. Below is the iRule attached the to VS:
when XML_CONTENT_BASED_ROUTING
{
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?No RepliesBe the first to reply
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
