Forum Discussion
Jim_Jack_103645
Nimbostratus
Aug 27, 2007redirect based on uri
We have a pool of servers which we direct our traffic to. Our testers want to be able to choose which server their request goes to by using a querystring.
e.g. we have servers a, b, c, d and e i...
Jim_Jack_103645
Nimbostratus
Aug 30, 2007Here is my first attempt.
It first attempt to see if the request if from a bot and sends to a specialised server if it is
It then looks for the querystring and sends accordingly.
Finaly, if the querystring is not found, it sends to a default pool.
Can I have a peer review?
when HTTP_REQUEST {
if { [matchclass [string tolower [HTTP::header User-Agent]] contains $::bots] } {
is a bot .. send to the bot server
pool MIS-BOT50-DM
} else {
regular traffic
set v1 [URI::query [HTTP::uri] "lbsc"]
switch { v1 } {
"c" {
pool MIS-WEB50C
}
"d" {
pool MIS-WEB50D
}
"e" {
pool MIS-WEB50E
}
"f" {
pool MIS-WEB50F
}
default {
pool MIS-WEB50-DM
}
}
}
}
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
