Forum Discussion
Irule to redirect based on specific URI
A request comes in as host:x.x.x.x/path_1/VMRCConsole.html or path_1/WebMKSConsole.html and for some reason hits the "default" in this rule instead of the specific statement that is intended to redirect to the correct pool. Can someone tell me what I am missing? The majority of this rule works perfectly. path_1 is the same path in all of these statements so that may be part of the problem. The reason for the rule is that we do not want user to be able to go to /path_1 without specific URI on the end of it.
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { “/unique*” { SSL::disable serverside pool pool_b
log local0. "[IP::client_addr] with URI of [HTTP::uri] went to pool_b }
"path_1/WebMKSConsole.html" {
pool pool_A
}
"path_1/org/*" { pool pool_A} "path_1/VMRCConsole.html" { pool pool_A
} "path_1/support/*" { pool pool_A
} "path_1/amf/*" { pool pool_A
} "/transfer/*" { pool pool_A
}
default {
HTTP::redirect "https://some.page.for.redirects log local0. "Source IP address for connection to node: [IP::client_addr] [HTTP::uri]" }
}
}
1 Reply
- StephanManthey
Nacreous
Hi,
you are applying a lower case conversion and therefor your jumplist needs to be lowercase as well:when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/unique*" { SSL::disable serverside pool pool_b log local0. "[IP::client_addr] with URI of [HTTP::uri] went to pool_b" } "/path_1/webmksconsole.html" { pool pool_A } "/path_1/org/*" { pool pool_A } "/path_1/vmrcconsole.html" { pool pool_A } "/path_1/support/*" { pool pool_A } "/path_1/amf/*" { pool pool_A } "/transfer/*" { pool pool_A } default { HTTP::redirect "https://some.page.for.redirects log local0. "Source IP address for connection to node: [IP::client_addr] [HTTP::uri]" } } }
Recent Discussions
Related Content
* 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