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.
...
Travis_Langtry_
Nimbostratus
Jan 16, 2009Here are the entries from the config file tor the virtual server, pools, and iRules:
virtual learn {
destination 10.2.4.100:http
ip protocol tcp
profile http tcp-lan-optimized
persist source_persist_600
pool Test
rule learn-test test-bot-shunt
}
pool Test {
lb method member observed
action on svcdown reset
monitor all check_www
member 10.2.1.11:http
}
pool learn-test {
lb method member observed
action on svcdown reset
monitor all check_www
member 10.2.1.237:http
}
pool bot-shunt {
lb method observed
action on svcdown reset
monitor all check_www
member 10.2.1.170:any
member 10.2.1.248:any
}
rule learn-test {
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]"
}
}
}
rule test-bot-shunt {
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*googlebot*" -
"*slurp*" -
"*msnbot*" -
"*majestic12*" -
"*spider*" -
"*crawler*" -
"*robot*" -
"*scanalert*" -
"*redcarpet*" {
Send bots to the bot pool
pool bot-shunt
}
default {
Send all other requests to a default pool
pool Test
}
}
}
}
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
