Forum Discussion
Steve-S_87321
Nimbostratus
Aug 30, 2007I-rule to redirect using regular expression
Hello,
I need to know how to write an irule to redirect to a server using port 8080 if a keyword or regular expression is included in the uri. Without the keyword it should go to the same s...
hoolio
Cirrostratus
Aug 31, 2007Hi Steve,
You can create a pool for the servers listening on port 80 and one for port 8080. You can then use a rule with string comparisons (starts_with, contains, ends_with) or a regex using matches_regex, to determine which pool to send the request to. Here is an example:
if (http_uri starts_with "/some_uri"){
use pool port_80_pool
} elseif (http_uri matches_regex "(?:some regex)"){
use pool port_8080_pool
} else {
use pool default_pool
}
Aaron
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