Forum Discussion
John_41578
Nimbostratus
Aug 31, 2009iRule that allows passing parameters
Hi,
Newbie here trying to figure things out. I have an iRule set as follows (condensed for brevity, actual paths removed for security):
when HTTP_REQUEST {
switch...
hoolio
Cirrostratus
Aug 31, 2009Hi John,
You can check the path (URI minus the query string) using HTTP::path (Click here) instead of HTTP::uri in your switch statement. This will allow you to ignore the query string.
Also, for switch statements, if multiple cases use the same action, you can group them using the hyphen:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/foo"-
"/foo/*" { pool content_pool }
default { pool pool_main_site }
}
}
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