Forum Discussion
SP_SINGH_279526
Nimbostratus
Feb 17, 2017Simple -iRule with URI not behaving as expected
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/api*" -
"/API*" {
pool pool-XYZ
}
"/style*" -
"/help*" -
default {
pool pool-AMC
}
...
Ed_Summers
Nimbostratus
Feb 17, 2017I'm having a little trouble reading due to the way the formatting came through, but one thing that stands out is that the case is different between your test and the actual request.
Your test uses /Help (upper-case 'H'), while the test is all lower-case.
You could change the case in your test to match the expected input, or use the tcl 'string tolower' function to convert the input to all lower-case first, then test based on lower-case. Which method you use depends on how you need to handle expected inputs and preference.
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