Forum Discussion
mihaic MVP
MVP
Jan 27, 2015Http class to irule conversion?
 Does anyone know how to convert a http class to an irule.
Starting with version 11.4 it seems http classes do not exist anymore.
I need to convert a lot of http classes to an irule for a new device w...
StephanManthey Nacreous
Nacreous
Jan 27, 2015Hi mihaic,
in case you want to consolidate the whole thing into a single iRule the "switch" command will be helpful:when HTTP_REQUEST {
    switch -glob [string tolower [HTTP::path]] {
    "/path01*" { pool pool_app_01 }
    "/path02*" { pool pool_app_02 }
    "/path03*" { pool pool_app_03 }
    default    { pool pool_default }
    }
}
This approach is faster than testing through a long list of if/elseif/elseif/.../else conditions.
Thanks, StephanRecent 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