Forum Discussion
wick54
Nimbostratus
Sep 16, 2019Write an irule or a policy to allow specific URIs
Hi Guys, I'm quite new to F5. We have a requirement for allow only 4 specific URIs and block any other URI. What would be the best way to do it. Would it be using an irule or using a LTM policy...
Faruk_AYDIN
Altostratus
Sep 17, 2019use this iRule:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]]
"/uri1*" -
"/uri2*" -
"/uri3*" -
"/uri4"
{
#do nothing
}
default
{
#drop others
drop
}
}
wick54
Nimbostratus
Sep 17, 2019Thanks, I will try this, if URI contains Uppercase characters, do i need to change to it lower case in iRule? would that be matched?
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