Forum Discussion
IRule to select IRule doesn't work even if the condition triggers
Problem Statement:
Trying to create a I-Rule to forward traffic to a pool "pool-troubleshooting" in case a header is passed in a request, the "if" condition triggers as the logs are part of the loop but still the traffic goes to the default pool at Virtual server.
BIG-IP 14.1.2
IRule:
when HTTP_REQUEST {
if { [HTTP::header exists testing] } {
pool pool-troubleshooting
foreach aHeader [HTTP::header names] {
log local0. "Redirecting to troubleshooting pool HTTP REQUEST HEADER $aHeader: [HTTP::header value $aHeader]"
}
}
}
Logs:
Rule troubleshooting-pool <HTTP_REQUEST>: Redirecting to troubleshooting pool HTTP REQUEST HEADER Host: example.com
Rule troubleshooting-pool <HTTP_REQUEST>: Redirecting to troubleshooting pool HTTP REQUEST HEADER User-Agent: curl/7.68.0
Rule troubleshooting-pool <HTTP_REQUEST>: Redirecting to troubleshooting pool HTTP REQUEST HEADER Accept: */*
Rule troubleshooting-pool <HTTP_REQUEST>: Redirecting to troubleshooting pool HTTP REQUEST HEADER testing: True
Rule troubleshooting-pool <HTTP_REQUEST>: Redirecting to troubleshooting pool HTTP REQUEST HEADER TLS-Version: TLSv1.2
Rule troubleshooting-pool <HTTP_REQUEST>: Redirecting to troubleshooting pool HTTP REQUEST HEADER TLS-Cipher: EXXXXX
Any help in troubleshooting will be appreciated. :)
5 Replies
Recent Discussions
Related Content
* 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