Forum Discussion
Luis_Melendrez
Altostratus
Sep 25, 2017Allow multiple subdirectories on same irule
I would like to allow the deny some directories and block others. For example:
Deny /folder1/public/info /folder1/public/manage /folder1/public/ping
Allow /MainPage /folder1/ab/vip/* /folder1/ab/rep/* /folder1/ab/u2/* /folder1/ab/u2_reload/* /folder1/opq/* /folder1/public/*
Is it possible to accomplish this in one irule?
- Faruk_AYDIN
Altostratus
Hi Guy,
Use this iRule :when HTTP_REQUEST { switch -glob [string tolower [HTTP::path]] { "/folder1/public/info" - "/folder1/public/manage" - "/folder1/public/ping" { discard/deny specific directories discard } "/MainPage" - "/folder1/ab/vip/*" - "/folder1/ab/rep/*" - "/folder1/ab/u2/*" - "/folder1/ab/u2_reload/*" - "/folder1/opq/*" - "/folder1/public/*" { do nothing, allow , go ahead } default { discard rest discard } } }
- Stanislas_Piro2
Cumulonimbus
Hi,
You can do it with a local traffic policy instead of irule.
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