Forum Discussion
F5866
Nimbostratus
Apr 09, 2019irule query on uri match
Hi,
Have a question on following irule.
when HTTP_REQUEST {
log local0. "Host header is [HTTP::host]"
switch [string tolower [HTTP::host]] {
"example1.com" {
lo...
Lee_Sutcliffe
Nacreous
Apr 09, 2019You can need to use
-glob type matching so that you can match on and example.com.
"*example1.com" essentially means - a host header that ends with "example1.com"
when HTTP_REQUEST {
log local0. "Host header is [HTTP::host]"
switch -glob [string tolower [HTTP::host]] {
"*example1.com" {
log local0. "matched example1.com"
pool number1
}
"*example2.com" {
log local0. "example2.com"
pool number2
}
}
}
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