Forum Discussion
Domai_23823
Nimbostratus
May 09, 2018URI redirect iRule review/Help
Hello Guys,
I have a question or review request for the below iRule. let me tell you about the requirement first.
The user needs redirect to any URI that starts with /monkey/* BUT does...
JG
Cumulonimbus
May 09, 2018I hope this is what you need:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "main.you.com" } {
switch -glob [string tolower [HTTP::path]] {
"/monkey/std/public/v1*" -
"/monkey/std/public/v2*" {
pool main.you.com_pool
}
"/monkey/*" {
HTTP::redirect "https://side.you.com/"
}
default {
pool main.you.com_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