Forum Discussion
KJ_50941
Nimbostratus
Jan 07, 2019Help with redirect Irule and pool selection
currently on F5 VIP I have created pool section iRule as below which works great, however new requirement is to redirect from "https://www.example.com/test/login to https://www.example.com/test2 so users don't have to type new url ( https://www.example.com/test2) .
when HTTP_REQUEST {
log local0. "Requesting URI is [string tolower [HTTP::uri]] and Path is [string tolower [HTTP::path]]"switch -glob [string tolower [HTTP::uri]] {
"/test/*" { pool test_Pool }
"/test2/*" { pool test2_Pool }
}
}
- Faruk_AYDIN
Nimbostratus
switch -glob [string tolower [HTTP::uri]] { "/test/login" { HTTP::redirect "https://www.example.com/test2" } "/test/*" { pool test_Pool } "/test2/*" { pool test2_Pool } }
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