10-Nov-2020
11:25
- last edited on
04-Jun-2023
21:11
by
JimmyPackets
I have an iFile that I want to use to display a redirect maintenance page. Here is what I have so far:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "site.domain.com"}{
switch [HTTP::uri] {
"/file.html" {HTTP::respond 200 content [ifile get "file.html"] }
default {HTTP::respond 200 content [ifile get "file.html"] }
}
}
}
My question here is that we have some iRules that reference different paths for site.domain.com. ex: site.domain.com/tree, /apple, etc. Will this overule the other iRule for the the different pathings on the site?
13-Nov-2020
00:39
- last edited on
24-Mar-2022
01:07
by
li-migration
Hi ,
As far i recollect, you cannot call multiple http respond/redirect in a single event, it will throw TCL error with Operation not supported, too many redirect/respond in same event. But.... When you use conditions like ( if/else, switch), it should work, because the condition alone gets executed thus eliminating multiple respond or redirect being invoked in same process.