Forum Discussion
JeffM
Nimbostratus
Apr 29, 2014iRule to include / but not /*
A request has come in to create an iRule to filter traffic for /, /common, /etc, and /index.html to goto pool_A and all other content to goto pool_B. The issue I am running into is that once I inclu...
Kevin_Stewart
Employee
Apr 29, 2014Try this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/" -
"/common*" -
"/etc*" -
"/index.html*" { pool pool_A }
default { pool pool_B }
}
}
The -glob switch allows you to pattern match around the specified URIs. However, specifying the "/" URI without the * wildcard means exact match.
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