Forum Discussion
JNeilson_117973
Nimbostratus
Jan 19, 2015iRule to allow one of two URIs block all others
I am trying to create an iRule that will allow a URL that contains:
/!portal/240100000001001 or /!portal/240100000001002 and blocks all other variations.
I have tried using a data group with iRu...
What_Lies_Bene1
Cirrostratus
Jan 19, 2015I wouldn't both with a data group if there are only two URIs involved. I'd use something like this. You can remove the logging once it tests out OK;
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/system/templates/selfservice/sunburst/!portal/240100000001001" {
Stop processing the iRule for this event here
log local0. "Match on 240100000001001"
return
}
"/system/templates/selfservice/sunburst/!portal/240100000001002" {
Stop processing the iRule for this event here
log local0. "Match on 240100000001002"
return
}
"default" {
drop
}
}
}
If you don't see a match, perhaps its to do with the
!?Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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