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
Sep 06, 2007Both rule are straightforward enough and should work. With the first rule, are you sure that the request is being sent to the wrong pool? Can you add logging to see?
Here's an example:
if (tolower(http_uri) contains "getimage") {
log "matched: client" + client_addr + ":" + client_port + " " + http_host + http_uri
use pool bscc.sysco.com-8080
}
else {
log "didn't match: client" + client_addr + ":" + client_port + " " + http_host + http_uri
use pool bscc.sysco.com-80
}
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