Forum Discussion
Mohammad_Hossei
Nimbostratus
Jun 13, 2018switch -glob issue with URI tolower string
Hi Guys,
I expect this irule to be working for me based on my URI but it is not working.
it only supports lowercases and can't detect anything in Capital like Lion or TIGER.
Please help if you have ...
JG
Cumulonimbus
Jun 13, 2018You had a typo; also I'd use [HTTP::path] instead.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/lion" {
pool test1 member 1.1.1.1 8080
}
"/tiger" {
pool test1 member 1.1.1.2 8080
}
"/mouse*" {
pool test1 member 1.1.1.3 8080
}
default {
HTTP::redirect "/tiger"
}
}
}
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