Forum Discussion
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
- IheartF5_45022
Nacreous
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]] {
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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