Forum Discussion
Nacho_de_Aguina
Nimbostratus
Oct 19, 2007Redirect depending 2nd level
Hello
I would like to redirect http requests to a pool depending on the second level URI
Let me explain myself
http://www.mycompany.com/finances/dev
Depending on dev in this case it should be send to a pool1
I try this irule first part(which affects to the first level) works fine but the second part it doenst works
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { $uri starts_with "/tics"
or $uri starts_with "/customer"
or $uri contains "jdbc"
}
{
pool pool_www
} elseif { $uri starts_with "/finances/dev" } {
pool pool_dev
} else {
HTTP::redirect "http://www.f5.com/"
}
}
Does anybody knows what im doing wrong?
The Server replies to http://local_IP/finances/dev
Thanks in advance
Nacho de Aguinaga
- hoolio
Cirrostratus
Hi,when HTTP_REQUEST { set uri [string tolower [HTTP::uri]] log local0. "[IP::client_addr] - \$uri: $uri" if { $uri starts_with "/tics" or $uri starts_with "/customer" or $uri contains "jdbc"}{ log local0. "[IP::client_addr] - matched test for pool_www" pool pool_www } elseif { $uri starts_with "/finances/dev" } { log local0. "[IP::client_addr] - matched test for pool_dev" pool pool_dev } else { log local0. "[IP::client_addr] - default: redirected" HTTP::redirect "http://www.f5.com/" } }
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