Forum Discussion
Dave_21103
Nimbostratus
May 16, 2014iRule for URI Switching Nested Inside of Hostname Switching
Is it possible to nest URI switching inside hostname switching? If so, does someone have any links or suggestions I can try? I found a hostname switching example (below, after uri example). However, ...
Kevin_Stewart
Employee
May 17, 2014Absolutely possible.
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"www.domain.com" {
switch -glob [string tolower [HTTP::uri]] {
"/app1*" { log local0. "app1" }
"/app2*" { log local0. "app2" }
"/app3*" { log local0. "app3" }
default { drop }
}
}
default {
drop
}
}
}
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