Forum Discussion
FFX2014_23725
Nimbostratus
Jul 17, 2014iRule to block HTTPS uri
I have a request from a customer to block a specific HTTPS uri. When the URI is hit, the connection is rejected and return a http 404 error.
URI:
https://aaaa.com/bbb/ccc.xml
I just wanted to con...
Kevin_Stewart
Employee
Jul 17, 2014The [HTTP::host] command will return the Host header portion of the URL (ex. aaaa.com), while the [HTTP::uri] command will return the URI portion of the URL (ex. /bbb/ccc/xml). If you just care about the URI, then the following should work:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/bbb/ccc.xml" } {
HTTP::respond 404 "Not Found" "Connection" "close"
}
}
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