Forum Discussion
excluding specific uri from datagroup
That's a problem when have hundreds of URI's starting with /myweb/folder1/coronatime
Sure let me explain again
So you have this DG: myweb_Uri_Data_group and it has URI starts with /myweb/folder1/coronatime . And your website has hundreds of URIs starting with /myweb/folder1/coronatime , and you have only one URI starts with /myweb/folder1/coronatime-xyz that you want to exclude from your DG.
So the only way I can think about is this way:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/myweb/folder1/coronatime-xyz } {
return
}
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]"
}
}So my question: Is this the best solution or there is another best solution to exclude this specific URI ?
And another question - in general- should the "return' exits the entire irule or only the related "if" function?
Your suggestion regarding "equal" is not helping here .. because I have another hundreds of URIs starting with "/myweb/folder1/coronatime" such as:
/myweb/folder1/coronatime-memo
/myweb/folder1/coronatime-mamo
/myweb/folder1/coronatime-tatoo
etc etc ..
Thanks
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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