Forum Discussion
Nick_Palmer_f5
Apr 24, 2012Nimbostratus
iRule Redirect Issue
Greetings!
I needed to separate traffic to URIs containing /specific/folder/ in them. So, I created a simple iRule that, I thought, would do that:
when HTTP_REQUEST {
set my_uri [string tolower [HTTP::uri]]
if { $my_uri contains "/specific/folder/" } {
pool www.specificpool.com
}
}
All calls with /specific/folder/ in them should go to a different pool of servers, www.specificpool.com. All other calls should be directed to the original pool of servers. Instead I'm seeing all types of traffic on www.specificpool.com, both to /specific/folder/ and to other folders as well.
Asking for your expertise to help me make sure no other calls but to /specific/folder/ end up in www.specificpool.com. Greatly appreciate your time!
- Chris_MillerAltostratusI'd expect this to use your default pool but let's add an else just in case:
when HTTP_REQUEST { set my_uri [string tolower [HTTP::uri]] if { $my_uri contains "/specific/folder/" } { pool www.specificpool.com } else { pool default_pool } }
- Nick_Palmer_f5NimbostratusHi Chris, and thank you for the solution! It worked great. I do appreciate your help.
- jgranieriNimbostratus
I recommend doing this with a HTTP policy. should be very easy to add any specific URL and direct it to a pool... you can add rules for each URI and a default "catch-all" rule that forwards everything else to all.
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