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....
Jul 02, 2015
The only thing I see is that you specified you wanted anything starting with "/abc/" to be rejected. In the iRule you have anything starting with "/abc". Not sure if that's what you intended or not. I couldn't save that iRule as-is due to parsing errors. Try this
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/abc/" } {
log local0. "Rejecting "/abc/* request"
reject
}
}
This should print a message to the /var/log/messages file everytime a /abc/* request comes in. /var/log/messages should also print out any errors you are having.
-Joe
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