Forum Discussion
Claude_Chouinar
Nimbostratus
Jan 12, 2014iRule for specific URL to be sent to singel node in the pool
Hello,
We are looking to direct traffic based on a specific URL to a single node in our pool.
Does anyone know the best way to accomplish this task?
Thank you,
Claude Chouinard
Kevin_Stewart
Employee
Jan 12, 2014A few syntactical errors:
-
Your [string tolower ] command should only be encapsulating the HTTP::uri, not the entire string.
[string tolower [HTTP::uri]] -
Your URL should probably be in double quotes.
-
The [HTTP::uri] command is only going to retrieve the URI portion of the URL, so it would see
/images/alp/captchaImages -
You don't need to encapsulate the pool name in single quotes.
So assuming you don't really care about the Host portion of the URI, something like this should work for you:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] equals "/images/alp/captchaImages" } {
pool pool_name member 10.10.10.65 80
}
}
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