Forum Discussion
AngryCat_52750
Nimbostratus
Nov 30, 2012Check URI and then drop
We are looking to setup an irule that would only permit a specfic URI and drop any other requests..
How do i script the part to do the "dropping"?
when HTTP_REQUEST {
if { [HTTP::ur...
Kevin_Stewart
Employee
Nov 30, 2012The simplest approach might be something like this:
when HTTP_REQUEST {
if { not ( [string tolower [HTTP::uri]] starts_with "/abc" ) } {
drop
}
}
You probably already have the pool defined in the virtual server, so you don't need to assign it here. The 'drop' command is also a bit harsh. You can instead either redirect the user (HTTP::respond 302 Location "blah"), or sending them some friendly HTML (HTTP::respond 200 content "go away!").
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