Forum Discussion

Geoff_34657's avatar
Geoff_34657
Icon for Nimbostratus rankNimbostratus
Mar 28, 2019

Irule for pool direction

I have an irule that works properly in Edge and in Chrome but, fails in IE. I am not sure why though. My logs say it's the same request but, IE gives a 404 page cannot be found error.

 

when HTTP_REQUEST {

 

set my_uri [string tolower [HTTP::uri]]

 

set my_host [string tolower [HTTP::host]]

 

if { $my_uri contains "/core/" } {

 

pool Enterprise_Search_POC.11040

 

log local0. "Directing core port for CORE: $my_host $my_uri "

 

} if { $my_uri contains "/api/" } {

 

pool Enterprise_Search_POC.11040

 

log local0. "Directing core port for API : $my_host $my_uri "

 

} }

 

1 Reply

  • when HTTP_REQUEST {
    
      switch -glob -- [string tolower [HTTP::path]] {
        "*/core/*"          {
          pool Enterprise_Search_POC.11040
          log local0. "Directing core port for CORE: [HTTP::host] [HTTP::uri] "
        }
        "*/api/*"          {
          pool Enterprise_Search_POC.11040
          log local0. "Directing core port for API : [HTTP::host] [HTTP::uri] "
        }
        default {
           pool some_defaut_pool
        }
      }
    }
    

    Not sure if typo, but in both cases you have the same pool.