Forum Discussion
FishNiX_29746
Nimbostratus
Feb 19, 2012Flexible host + uri redirector with data-groups
Hi!
We have an irule that I've been trying to port over from v9. In v9 it was simple... I had 2 classes, a keep_uri and a nokeep_uri class, each in the format:
hosthe...
hoolio
Cirrostratus
Feb 20, 2012Hi FishNiX,
A couple points:
You can retrieve the name and value of a data group entry using -element. This avoids needing to run two class searches to check if the name matches and then get the value.
I haven't read your rule closely enough to know why you're looping through the data group. Ideally, you'd avoid this by using default class command options. If that can't be done, then save the value of the current element and use that to log values. When you log [class nextelement -name $cn $id] you're actually getting the next element instead of logging the current element. If you only have one element in the data group, you'll get the runtime error.
Aaron
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