Forum Discussion
stucky101_88485
Aug 13, 2012Nimbostratus
class iteration for key/value
Gurus
I know you don't usually need to manually iterate over a class as it does this automatically.
Example : I have a class called "in_maintenance" containing a list of URIs. Any match...
stucky101_88485
Aug 13, 2012Nimbostratus
Hoolio
I think there is a misunderstanding. My first rule (the maintenance one) works fine and I don't think it can be any shorter. This data group list doesn't contain key/values but just keys (those keys being URIs which should redirect to the maint page). The main page is always the same so its coded into the iRule itself.
My question was regarding the second example where I wanna keep a mapping between bad and good URI's like :
/app_old := /app_new
/app2_old := /app2_new
etc...
so the ltm would crack open evey http header and check every URI against this list. If one is found it redirects to this URI's new value and then breaks out of the loop.
As you can see I have to do a lot more work here. I have to grab each element and separate the left side from the right side using lindex.
I was just wondering if this could be accomplished in 2-3 lines just like the maintenance example.
Hope this clarifies.
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