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...
Elias_O_16228
Nimbostratus
Apr 23, 2013Thanks Kevin,
Yes, I want to match the whole request (host, port, and uri), also port and URI are specific to a service.
Check this out:
when HTTP_REQUEST {
switch "[string tolower [HTTP::host]]:[TCP::local_port][string tolower [HTTP::uri]]" {
"8088" { pool Stagin_Pool }
"8089" { pool Management_Pool }
"8090" { pool Development_Pool }
"8091" { pool Test_Lab_Pool }
default { pool Production_Pool }
}
}
Does it make a difference if capture the protocol specifier since users need to specify the whole link in the browser e.g. http://example.mtd.today.com:8089/wednesday/ or it will work regardless?
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