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 23, 2013The [string tolower [HTTP::uri]] commands will only return the lowercase version of the requested URI, nothing more.
ex. "/tuesday"
You need [string tolower [HTTP::host]] to return the Host information (ie. "example.mtd.today.com"), [TCP::client_port] to return the port (ex. 8088), and none of these will return the protocol specifier (ex. "http://). The switch command is going to take what's given, in this case the request URI, and look for it in the switch conditions. None of your switch conditions will ever match because you're providing more than the URI.My recommendation was to skip the [HTTP::host] evaluation (because the requested host is always the same) and just focus on either the port OR the URI.
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