Forum Discussion
Darshan_Singh_2
Nimbostratus
Jul 02, 2015iRule to drop if uri starts with specific word.
Customer have requiment that if there URI starts with /abc/* then drop the request.
For this I created below iRule after applying this all traffic was getting drop. Please suggest what I missed....
Vijay_E
Cirrus
Jun 02, 2016You can certainly use "contains" instead of "starts_with" but will it achieve the functionality that you are seeking ? I think you need to discuss with the customer to understand the function required and also inform him of what exactly your iRule will do before implementing.
I would recommend logging the actual URI that is being dropped to compare:
Using Joe's iRule:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/abc/" } {
log local0. "Rejecting [HTTP::uri] request"
reject
}
}
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