Forum Discussion
ORYX_GTL_197857
Nimbostratus
Mar 22, 2018iRule: multiple URI redirection
Hi..
I need to do the redirect for HTTPS traffic based on URI contains. I followed working iRule (two pools) and did modifications below but it's giving an error please any help is highly appreciated.
Working iRule
when HTTP_REQUEST { if { [HTTP::uri] contains "prod" } { pool prod_pool } else { pool default_pool } }
Modified iRule but not working
when HTTP_REQUEST { if { [HTTP::uri] contains "prod" } { pool prod_pool } if { [HTTP::uri] contains "dev" } { pool dev_Pool } else { pool default_pool } }
- JG
Cumulonimbus
when HTTP_REQUEST { if { [HTTP::uri] contains "prod" } { pool prod_pool } elseif { [HTTP::uri] contains "dev" } { pool dev_Pool } else { pool default_pool } }
However, "contains" sounds a bit too broad to me.
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