Forum Discussion
iRule
Cirrus
Aug 01, 2021Redirect requests of all URLs except few URLs
Dear Beloved Community, I have a requirement to fulfill in LTM as below for which I need your support to provide me an iRule. Client requests containing any URIs should be redirected as below ...
Aug 02, 2021
Do the urls start with "/morning", "/afternoon", "/night", "/school", "/leadership" or are they exactly equals?
when HTTP_REQUEST {
if { [HTTP::host] equals "abc.com" } {
switch -glob [string tolower [HTTP::uri]] {
"/morning*" -
"/afternoon*" -
"/night*" -
"/school*" -
"/leadership*" {
log local0. "not redirect - uri: [HTTP::uri]"
}
default {
log local0. "redirect - uri: [HTTP::uri]"
HTTP::redirect https://xyz.com[HTTP::uri]
return
}
}
}
}Can you investigate the ltm logs?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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