For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Glenn_32883's avatar
Glenn_32883
Icon for Nimbostratus rankNimbostratus
Feb 21, 2014

Sending specific URIs to a separate pool

I've been searching through postings here, and I have an example that is pretty much exactly what I want to do, but it isn't working for me. This was the thread I followed.

irule-configuration-for-sending-requests-to-specific-pool-members

We are setting up a new site, but we have an old site that we need to send certain requests to still. That traffic needs to go to "pool_site_old" which is the pool for the old sites Virtual Server. Still running.

The new site is setup with a new pool of servers. I created a new Virtual Server to test with, so I set that up to use "pool_site_new"

One thing I need to confirm - I have the virtual server setup with "pool_site_new" but I want to send certain request to a pool that is not part of my Virtual Server. Is that going to work?

This is my version of the irule and I applied it to the new sites Virtual Server.

when HTTP_REQUEST {
  switch [string tolower [HTTP::uri]] {
  "/examDownload*" - 
 "/examDownloadAdmin*" - 
    "/siteAdmin*" - 
    "/siteDigitalDownload*" - 
  "/siteDigitalDownloadAdmin*" - 
 "/siteDownload*" {
      pool pool_site_old
}
    default {
      pool pool_site_new
    }
  }
}

It isn't working. I've put a test page in the specific folders, and whenever I try to hit it on what should take me to the "pool_site_old" servers, I get 404 errors.

Looking for any insight into what I am missing.

Thanks!

Glenn

1 Reply

  • Hi - you are missing the -glob from your switch statement to allow the use of the special character * (and others) for matching;

    switch -glob [string tolower [HTTP::uri]] {