Forum Discussion
Andrea_Knapp_28
Nimbostratus
Aug 01, 2006Rule based on Directory.....
Hi All -
I am trying to create a rule in which a request is sent to a pool if it is in the directory. For example if http://abc.thisdomain.com comes in I want it to go to a maintenance poo...
hoolio
Cirrostratus
Aug 01, 2006Hi Andi,
Do you care what the host in the request is, or do you just want to route requests to a pool based on the URI (directory)?
Here's an example if you want to check the host is abc.thisdomain.com:
if (http_host equals "abc.thisdomain.com") {
if (http_uri equals "/") {
use pool pool1
}
else if (http_uri starts_with "/language") {
use pool pool2
}
}
else {
use pool default_pool
}Else, if you just want to make the load balancing decision based on the URI, you can use something like this:
if (http_uri equals "/") {
use pool pool1
}
else if (http_uri starts_with "/language") {
use pool pool2
}
else {
use pool default_pool
}I wasn't able to get to a 4.x box to test this, so reply if you get any syntax errors or have more questions.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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