Forum Discussion
Matthew_Goche_6
Nimbostratus
Mar 31, 2006iRule Redirect to new pool
I have created an iRule to redirect some requests to a different pool (below called APPPool) based on URI. I have the default pool setup to do cookie load balancing. I only want clients to go to this second pool when they have a specific URI (_app_proxy_list). However, what I am seeing is once they have been redirected to this second pool, they are able to come back to it with a non-approved URI (i.e. one not included in _app_proxy_list). I believe this is occuring due to the client being assigned a cookie, but I thought that the client would pass through the iRule every time they go through the accelerator. Am I wrong with that assumption or is there a problem with my iRule?
when HTTP_REQUEST {
if { [matchclass [URI::decode [string tolower [HTTP::uri]]] contains $::_bad_uris] } {
discard
}
elseif { [matchclass [URI::decode [string tolower [HTTP::uri]]] contains $::_app_proxy_list] } {
pool APPPool
}
}
1 Reply
- unRuleY_95363Historic F5 AccountThe last selected pool is always used, so subsequent requests on the same connection that don't match either of your if conditions will continue to use whatever the last pool that was selected. You simply need to add an "else { pool ... }" to direct non-matching requests to whatever your default pool is.
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