Forum Discussion
mambrose_57200
Nimbostratus
Nov 28, 2008rewrite between pools
I need to create a rule to redirect traffic for static files from the appserver pool to a library pool. I've tried this with no luck.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/strin1" } {
pool library_pool
} elseif { [HTTP::uri] starts_with "/string2" } {
pool library_pool
}
}
Does anyone have some suggestions?
Thanks
- dennypayne
Employee
Your syntax looks fine. If the URI doesn't match either of those two strings it should fall out to whatever is defined as the default pool on the virtual server. You might try adding some logging to see why it's not matching (not sure exactly what behavior you are seeing when you say you've tried it with "no luck").when HTTP_REQUEST { if { [HTTP::uri] starts_with "/strin1" } { log local0. "Matched string1" pool library_pool } elseif { [HTTP::uri] starts_with "/string2" } { log local0. "Matched string2" pool library_pool } else { log local0. "Didn't match either string" } }
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