Forum Discussion
Paul_125684
Nimbostratus
Jul 28, 2016Using iRule to block a URL in Virtual server but doesn't work
I created a virtual server for a web site (10.11.12.100, www.abc.com) and using irule want to block a sub-site "www.abc.com/xyz" with below irule command but seems not work, please advise.
when ...
Raj_Bhatia_1778
Nimbostratus
Jul 29, 2016Do you really want a response back. Try closing the TCP connection & disabling all events after the response is send.
when HTTP_REQUEST {
if { ( [string tolower [HTTP::path]] contains "/xyz" ) } {
log local0. "dropped"
HTTP::respond 200 content "URL Blocked" Connection "Close"
TCP::close
event disable all
}
}
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