Forum Discussion
Andrew_Wilson_2
Nimbostratus
Jan 09, 2007Search for specifc text in URL
Firstly, I hate posting things when they should be easy to get working.. but this is doing my head in and it's so simple. All I want to do is look at the url and get the F5 to look at the string and if it contains the text lcccat=ecs then send it to a specific pool. If it doesn't match that string then do nothing.
This is what i've got. Any help would be appreciated:
when HTTP_REQUEST {
if {[HTTP::uri] contains "lcccat=ecs" } {
pool internal.google.server
}
}
- hoolio
Cirrostratus
That looks good. I'd suggest getting/setting the default pool on the VIP though. If a request comes in on one TCP connection and matches the condition in your rule it will go to the internal.google.server pool. If a second request comes in over that same TCP connection and does not match the condition, it will also go to internal.google.server pool--not the default pool configured on the VIP as you may expect.when CLIENT_ACCEPTED { set default_pool [LB::server pool] } when HTTP_REQUEST { if {[HTTP::uri] contains "lcccat=ecs" } { pool internal.google.server } else { pool $default_pool } }
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