Forum Discussion
kgaigl
Dec 15, 2022Cirrocumulus
IRule to block URL/URI from Data Group
Hello, we've a VS with about 20 URLs, now I've to block Login-Sites dor the most but not all URL's, for eg: www.somesite1.org/login www.somesite2.org/member www.somesite2.org/login I'd like to p...
CA_Valli
Dec 15, 2022MVP
Hi kgaigl ,
this should work. Note that I'm not putting URI in lowercase so /login and /LOGIN will require two different matches (they would be two different URLs indeed anyways)
when HTTP_REQUEST {
set req "[string tolower [HTTP::host]][HTTP::uri]"
if {[class match $req eq unallowed_datagroup]}{ HTTP::respond 403 }
}
ltm data-group internal unallowed_datagroup {
records {
www.somesite1.org/login { }
www.somesite2.org/member { }
www.somesite2.org/login { }
}
type string
}
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