Forum Discussion
peter_siman
Nimbostratus
May 29, 2011Pool selection based on URI string
Hi,
I have writtend a simple iRule to select particular pool based on what the URI string is. See below the iRule. Unfortunatelly, when applied a following messsages show up in logs.
...
Bob_10976
Nimbostratus
Jun 02, 2011I'm trying to do this same thing, however using the code above and modifiy for me doesn't seem to work. I'm running ver 10.2.0 HF1, my code is below:
when HTTP_REQUEST {
log local0. "McBob request received"
if { [string tolower [HTTP::path]] starts_with "/mcbob" } {
log local0. "McBob request for service received. Selecting end server"
pool secure2.mydomain.com
}
else { pool secure.mydomain.com
log local0. "Condition not matched. No WIN2K8 server selected."
}
}
when SERVER_CONNECTED {
log local0. "Connection from [IP::client_addr]:[TCP::client_port] to WIN2K8 server: [IP::server_addr]:[TCP::server_port] established."
}
I tried a few varations, in the HTTP:: I tried
HTTP::uri starts_with "/mcbob"
HTTP::uri equals " "
HTTP::path equals "/mcbob/default.html"
HTTP::path starts_with " "
I'm totally lost on what I'm doing wrong. The LTM logs shows no match found and I'm getting a 404 in my browswer so it simply not seeing it. any thoughts on what I'm doing wrong?
Thanks,
Bob
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