F5 BIG-IP 10.2.4
My iRule needs to exact-match on host and wild-card match on path.
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"internal.mycompany.com" {
switch -glob [string tolower [HTTP::path]] {
"/api1/*" {
Is this optimized as it is ? Would re-structuring as a single iRule provide further optimization ?
set $host [string tolower [HTTP::host]]
set $path [string tolower [HTTP::path]]
set $host-uri = "$host/$path"
when HTTP_REQUEST {
switch -glob [$host-uri] {
"internal.mycompany.com/api1/*" {