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 ...
hoolio
Cirrostratus
Jan 28, 2009What 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.
If you do see problems when testing the iRule, can you add some debug logging? You're referencing variables for the pool names, but I don't see that you've set the variables with pool names. Also, you probably just need to check the path for the request (not the host and URI) for the /ENTBPM/ and /CONTENTONLY/ strings. Here is an example with logging.
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
}
}
}
Aaron
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