Forum Discussion
Shripaty
Cirrus
Dec 26, 2019How to use a Datagroup of URI Strings to compare and select pool based on HTTP :: Path
HI , I have a scenario , I am trying to use do pool selection by comparing the starts_with part of the http::path with consecutive URI included in a Datagroup . More over , when i try to ...
Dec 27, 2019
Can you try this iRule?
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] starts_with "/a/b" } {
set newPath [string map {"/a/b" ""} [HTTP::path]]
# log local0. "Path without /a/b: $newPath"
if { [class match [string tolower $newPath] equals x_uri_list] } {
pool x_pool
}
elseif { [class match [string tolower $newPath] equals y_uri_list] } {
pool y_pool
}
else {
# reject
}
}
else {
# reject
}
}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
