Nezar_125534
Nov 08, 2016Nimbostratus
Block URL
Hi I want to config new iRule to block URL, for example: I need allow only this website: and block any others URL. Please help me.
Hi I want to config new iRule to block URL, for example: I need allow only this website: and block any others URL. Please help me.
It will be very easy if you have any uri in url to block..
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/*" } {
drop
}
}
Modify irule accordingly OR
Use of data group
class blockthis {
"/path1"
"/Path2"
}
when HTTP_REQUEST {
if {[class match [string tolower [HTTP::uri]] equals blockthis } {
drop
}
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/*" } { drop } }
Unfortunately it is not working.
Remove * from Uri else use data group irule. Problem will solve when HTTP_REQUEST { if { [HTTP::uri] starts_with "/" } { drop } }
I just realized that my answer went to another question. :/
Updated 2 hours ago•Originally posted on 08-Nov-2016 by Leonardo Souza 230 There are many questions with answers about how to block URLs with irules. See these 2 as example:
https://devcentral.f5.com/questions/block-specfic-url-and-allow-it-for-specfic-ip-address-49963
https://devcentral.f5.com/questions/irules-blocking-url-47529