Forum Discussion
Wackitron_36350
Altocumulus
Jul 23, 2018When HTTP Request has specific hostname and URI, redirect to diff Pool
Hi All,
I have been trying to make this below IRule work, But no success. My Client's requirement is to redirect HTTP Traffic for specific Host URL and specific URI to a different Pool. But I am...
Samir_Jha_52506
Noctilucent
Jul 23, 2018Slight modified existing iRule. you can write something like below....
when RULE_INIT {
Change to "1" to enable debugging log statements
set static::Poolxyz_select_debug 0
}
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] contains "api-dev" } {
switch -glob [string tolower [HTTP::uri]] {
"/someuri" { pool XYZ }
default { pool big_pool }
}
if { $static::Pool_select_debug eq 1 } {
log local0. "[IP::client_addr] with URI of [HTTP::uri] went to XYZ Pool"
}
}
}
Samir_Jha_52506
Noctilucent
Jul 23, 2018Cool, because traffic is going to default pool if uri didn't match. Plz modify URI in lower case('/someuri') and comments these lines in iRule. Rest no change...
default { pool big_pool }
Update the comments... Cheers...
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
