Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Filter request irule

cymru81
Altocumulus
Altocumulus

Hi, is it possible to use an irule to block access (or redirect to a different address) if https://www.abc.com or https://www.abc.com/ was visited but still allow access to https://www.abc.com/123/ and any other sub-directories?

1 REPLY 1

SanjayP
MVP
MVP

You can follow 2 approaches.

 

Neagtive Security - Allows everything, and reject what I know

 

when HTTP_REQUEST { switch -glob [HTTP::uri] { "/" - "/abc" { reject } default { return } } }

Positive Security - Rejects everything and allow only what I know

 

when HTTP_REQUEST { switch -glob [HTTP::uri] { "/123*" - "/234*" { return } default { drop } } }