Forum Discussion
George_32239
Nimbostratus
Oct 27, 2009Multiple comparisons in an iRule
Hello All,
I need a rule that will look at a hostname the [HTTP::host] and also looke at part of the URI, the [HTTP:uri] bit.
If both conditions are the same I need to send the request to a certain pool if both sets do not match need to send them to another pool.
I don't know if an ANDIF statement exists.
Apologies in advance, our firm has not sent us on any training courses and am struggling with this
Any help greatly appreciated
Thanks,
George
- George_32239
Nimbostratus
I think I figured it out using the following; - hoolio
Cirrostratus
Hi George,when HTTP_REQUEST { This event is triggered when LTM parses the HTTP request headers Check requested host using lower case if {[string tolower [HTTP::host]] eq "subdomain.example.com"}{ Check the requested URI if {[HTTP::uri] starts_with "/some_uri"}{ pool some_pool } else { pool other_pool } } else { pool some_other_pool } }
- George_32239
Nimbostratus
Hi Aaron,
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