irule to allow specific URL and block everything else.

Hi Folks,

I am looking to create an iRule that will allow only access to URl (https://test.com.ae/selfEnrollment) and block access to everything else.

https://test.com.ae/console https://1.2.3.4/console.

Actually we want to block /console as it is allowing outsider to connect with application management console.

Please advise.

There’s a few ways of doing this but perhaps something as simple as this to start with:

when HTTP_REQUEST { 
   if { [string tolower [HTTP::uri]] starts_with "console" } { 
     drop 
   } 
 }

Would this work for you?

N