Forum Discussion
Travis_Langtry_
Nimbostratus
Jan 16, 2009HTTP::URI
Hi all,
I am trying to write an iRule to make the following work:
1. Traffic sent to http://www.domain.com will use the default pool for the virtual server.
2. Traffic sent to http://www.domain.com/learn/ will get sent to a different pool.
The following is what I have written:
when HTTP_REQUEST {
if { [string tolower [ HTTP::uri ]] starts_with "/learn" } {
log local0. "1st Log For Request: [HTTP::uri]"
pool learn-test
log local0. "2nd Log For Request: [HTTP::uri]"
}
}
when I try to go to http://www.domain.com/learn, I get the following in the log files:
Jan 16 16:04:35 tmm tmm[1098]: Rule wirefly-learn-test : 1st Log For Request: /learn
Jan 16 16:04:35 tmm tmm[1098]: Rule wirefly-learn-test : 2nd Log For Request: /learn
The log statenents seem to work fine, however, no traffic is ever sent to the learn-test pool. The counters for the pool do not increment, and no traffic is generated to the server that is in the pool.
When I remove the iRule and set learn-test as the default pool for the virtual server, I can reach http://www.domain.com/learn just fine.
Any Ideas?????
- Colin_Walker_12Historic F5 AccountThat logic looks like it should work just fine. There are no error messages cropping up? Have you tried using the same iRule to send traffic to a different pool, by chance?
- Travis_Langtry_
Nimbostratus
Here are the entries from the config file tor the virtual server, pools, and iRules: - Jennifer_Davis2
Nimbostratus
when HTTP_REQUEST {
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