Forum Discussion
Joe_Curl_105786
Nimbostratus
Mar 31, 2010iRule Pool Selection
We have an iRule that we use to restrict access to only specific URI patterns. If the pattern is matched, then we select a pool. I was wondering if there is any way to tell it to select the pool tha...
The_Bhattman
Nimbostratus
Apr 01, 2010Hi Joe,
I think you can rewrite it to the following:
when HTTP_REQUEST {
From the client side context it's going to determine the VIP address it's connected to
if {[IP::addr [IP::local_addr] eq "192.168.12.3" } {
switch -glob [string tolower [HTTP::uri]] {
"/transportservlet*" -
"/aliveservlet*" { pool NRDC-PK-Mobility-QA-Pool }
default { reject }
}
}
}
I reworked the HTTP::uri evaluation to use SWITCH because it it's more efficient then IF-ELSE.
I hope this helps
Bhattman
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
