Forum Discussion
Tomeq_93315
Nimbostratus
Nov 25, 2013redirection iRule based on IP and URI
Hi, I'm having problem with the following iRule. I does not work. It looks like it's not trying even the first condition: when HTTP_REQUEST {
log local0. "Client [IP::client_...
What_Lies_Bene1
Cirrostratus
Nov 25, 2013Apologies IP::addr always catches me out. This should work;
when HTTP_REQUEST {
log local0. "Client [IP::client_addr]"
if { ( [IP::addr [IP::client_addr] equals x.x.x.x] ) and ( [string tolower [HTTP::uri]] starts_with "/someuriwithparameters" ) } {
log local0. "Client [IP::client_addr] matched case 1"
pool POOL1
}
if { ( [IP::addr [IP::client_addr] equals y.y.y.y] ) and ( [string tolower [HTTP::uri]] starts_with "/someuriwithparameters2" ) } {
log local0. "Client [IP::client_addr] matched case 2"
pool POOL1
}
}
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