Forum Discussion
Elias_O_16228
Nimbostratus
Apr 22, 2013Redirecting request based on port number
I have two application servers as pool members to multiple pools. I want to be able to load balance based on port.
For example, If a user click first link, load balance staging pool. If user is...
Kevin_Stewart
Employee
Apr 26, 2013The switch conditionals will evaluate what is sent to them. If you send "[TCP::local_port][string tolower [HTTP::uri]]" then the conditionals will see a port and a URI (ex. "8088/tuesday"). Because you're doing -glob on the switch, the example string will satisfy the first condition ("8088*") regardless of the URI. In fact nothing past the port number will matter at all because of the wildcard, so "[string tolower [HTTP::uri]]" has no effect at all.
If you still need to evaluate the URI, then your conditional should look something like this: "8088/tuesday*". If you care about the case of the URI, then just remove the [string tolower ] syntax.
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