Forum Discussion
Abed_AL-R
Cirrostratus
Nov 05, 2020excluding specific uri from datagroup
Hello guys I'm using this iRule to do redirection with data group: when HTTP_REQUEST {
if { [class match [string tolower [HTTP::uri]] starts_with myweb_Uri_Data_group] } {
HTTP::redirect...
Abed_AL-R
Cirrostratus
Nov 05, 2020That's a problem when have hundreds of URI's starting with /myweb/folder1/coronatime
jaikumar_f5
Noctilucent
Nov 06, 2020Yes the above logic would work too. Basically when you call return, if would stop further processing on that event. Here its HTTP_REQUEST. But note this will stop for this Irule alone. If there's other Irule mapped to the VS, they will still function
There's multiple options you can go,
- Use if/elseif option. Whichever URI's you want to be excluded, you can create a new datagroup for that and call it in the 1st if condition. Whether you want to go with starts_with or equals is purely your design call. In that way, when 1st if is passed, further elseif wont be processed. When it not matches, it goes to elseif, and checks with the other DG you have, in your case myweb_Uri_Data_group.
- Yes you can use return to stop further process of this event as well.
Good luck.
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