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...
FishNiX_29746
Nimbostratus
Feb 21, 2012BTW - Is the only way to use the [class startsearch $cn], [class anymore $cn $id], class donesearch $cn $id and get the current element, to use a counter? Something like this...
set cn redirect_302_nokeep
set id [class startsearch $cn]
set i 0
while { [class anymore $cn $id] } {
set n [class element $i $cn]
set u [lindex $n 0]
set r [lindex $n 1]
Do some stuff with the CURRENT values
set i [expr {$i + 1}]
}
class donesearch $cn $id
I assume I could do a foreach too? not sure if that would be a lot slower? Something like this
set cn redirect_302_nokeep
foreach { e } { [class names $cn] } {
set u [lindex $e 0]
set r [lindex $e 1]
Do some stuff
}
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