Forum Discussion
excluding 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 "[class match -value [string tolower [HTTP::uri]] starts_with myweb_Uri_Data_group]"
}
}
In the data group I have this uri to be redirected:
/myweb/folder1/coronatime
And I what to exclude this uri from datagroup:
/myweb/folder1/coronatime-xyz
What is the best way to exclude specific uri ?
is it using another "if" on the top with return statement ?
or there is another way?
Does the "return" exits the specific if function or exits all the irule?
Because it's written here that it does not exit from the iRule altogether: https://clouddocs.f5.com/api/irules/return.html
Thanks !!
Instead of starts_with go with equals.
- Abed_AL-RCirrostratus
That's a problem when have hundreds of URI's starting with /myweb/folder1/coronatime
Sorry I'm not following you, We are not going to use starts_with or contains, but be using equals. When equals condition is called it will look for exact match of the entire URI.
Can you tell how many you want to exclude from your original.
And yes you can still create a new DGL for exclusion and then use the return statement to break the flow on the current event.
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