Forum Discussion
Tom_White_69772
Nimbostratus
Jan 27, 2009URL/URI redirect
We have a request for a redirect on a VIP wherein the client comes into the VIP on port 9080 and wants to be directed between two pools based on the RUL/URI. I'm using an http request, but it is not working presumably because the request is coming in on port 9080 and not http, even tho' the clients are using their browser to access the app. Here is our current iRule, that is not working:
when HTTP_REQUEST {
switch -glob [HTTP::host][HTTP::uri] {
"*/ENTBPM/*" {
pool $entbpm_pool
}
"*/CONTENTONLY/*" {
pool $contentonly_pool
How can we modify this so it works using only port 9080?
- hoolio
Cirrostratus
What happens if you remove the iRule, associate the first pool to the VIP as the default pool, and test? Do requests for the URI's matching */ENTBPM/* succeed? What about if change the pool to the other and test a URI matching */CONTENTONLY/*? If that's not working you need to check the routing and VIP configuration. Once you get the VIP working with the individual pools, you can retest with the iRule for pool selection.when HTTP_REQUEST { set entbpm_pool "my_pool_name_1" set contentonly_pool "my_pool_name_2" set default_pool "my_pool_name_3" log local0. "[IP::client_addr]:[TCP::client_port]: New request to [IP::local_addr]:[TCP::local_port], [HTTP::host][HTTP::uri]" Check the requested path switch -glob [HTTP::path] { "*/ENTBPM/*" { log local0. "[IP::client_addr]:[TCP::client_port]: Matched $entbpm_pool pool" pool $entbpm_pool } "*/CONTENTONLY/*" { log local0. "[IP::client_addr]:[TCP::client_port]: Matched $contentonly_pool pool" pool $contentonly_pool } default { log local0. "[IP::client_addr]:[TCP::client_port]: Matched default pool" pool $default_pool } } }
- Tom_White_69772
Nimbostratus
Thanks! We've got it working now.
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