Forum Discussion
Brian_Kenworthy
Nimbostratus
Aug 03, 2011Help me drop traffic with iRule
Hey all, I am trying to modify an iRule to drop traffic based on http::path, but it doesn't seem to be working. When I enter the URL www.mydomain.com/Admin, I keep getting to the default page but I want the traffic dropped (never display default page). Here is my iRule:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/client/order.aspx" -
"/client/status.aspx" {
pool uat.mydomain.com_B2B_HTTPS
}
"/ordersearch/*" {
pool search.mydomain.com_HTTPS
}
"/Admin/*" {
reject }
default {
pool uat.mydomain.com_HTTPS
}
}
}
Thanks in advance!!
3 Replies
- Kevin_Davies_40
Nacreous
Because /Admin/ will never match /Admin
You need to use /Admin* - boomchke_11156
Nimbostratus
Good catch Jarvil! Sometimes you just need a second pair of eyes on these. - Brian_Kenworthy
Nimbostratus
Thanks Jarvil!! Many, many great second pairs of eyes on these forums. Thanks again!
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