darrenclegg_199
Feb 21, 2011Nimbostratus
URL and ip address blocking
I have an iRule that blocks users from using an ip address to access our sites and also stops the wrong URL accessing it (this was done because of an error in a forwarding rule on our proxy).
This rule blocks incorrect URLs and ip addresses from accessing the website (incase of misconfiguration on forwarding host)
when HTTP_REQUEST { if { not ([string tolower [HTTP::uri]] starts_with "/mysite.com/") }{
HTTP::respond 200 content \ "Wrong URL entered Access to this URL is not allowed using this method. Please inform the Network Administrator." "Content-Type" "text/html" } }
This works but is specific to mysite.com. Is there any way i can make this generic to all sites based on an allowed url list on ASM or any other method
cheers Darren