Forum Discussion
almudena_3796
Nimbostratus
Sep 11, 2013LTM VE 10.2.3: HTTP::uri
Hi everyone, My BIG-IP LTM VE has 10.2.3 version. I have created an irule, and a part of the code is:
switch -glob [HTTP::uri] { "/cm/" { set SELECTED_POOL "LPAGE_ALERTAS"
} "/delivery/im...
What_Lies_Bene1
Cirrostratus
Sep 12, 2013OK, try this, I've just added some logging, made the URI lowercase everywhere and reduced the size of the switch;
when HTTP_REQUEST {
set originaluri [string tolower [HTTP::uri]]
switch -glob [string tolower [HTTP::uri]] {
"/cm/" {
set SELECTED_POOL "LPAGE_ALERTAS"
}
"/delivery/imanager" -
"/delivery/wifi" {
set newuri [findstr $originaluri "/delivery" 9]
HTTP::uri $newuri
set SELECTED_POOL "LPAGE_DELIVERY_CMP"
log local0. "Rewriting URI from $originaluri to $newuri"
}
"/delivery" {
set SELECTED_POOL "LPAGE_DELIVERY_CMP"
}
default {
HTTP::respond 403
log local0. "No URI match, sending a 403 response"
}
}
}
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