Forum Discussion
Selective Access within Application via iRule
Greetings, iRule experts!
I'm trying to block access to certain pages within application using data group but can't make it work. The problem is that blocked and accessible pages are located under the same /Application. Example, URI /Application/Administration/Index.aspx must be blocked, whereas URI /Application/PasswordReset/Index.aspx should be accessible. Another difficulty is that every page has multiple page objects (.js, .css, etc.).
What would be best solution for this? Many thanks!
- AndOsCirrostratus
You could use an irule.
If everything under say /Application/Administration/ should be blocked and /Application/PasswordReset/ should be allowed then perhaps the irule in this thread might be what you are after.
https://devcentral.f5.com/questions/block-url-49989
Just have your datagroup as
class blockthis { "/application/administration/" "/application/anotherblocked/" }
and change equals to starts_with in the evaluation
when HTTP_REQUEST { if { [class match [string tolower [HTTP::uri]] starts_with blockthis] } { drop } }
/Andreas
- Nick_Palmer_f5Nimbostratus
Hi Andreas, and thanks for your comment! My issue was CaSe SensiTive. I went with data group and string tolower.
Recent Discussions
Related Content
* 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