Sabir_Alvi
Mar 08, 2018Altocumulus
iRule redirect to https if condition doesn't match
I need to send traffic to appr pools on port 80 based on a specific Host and URI combination and all other traffic should get redirected to https irrespective of Host and URI combination. I have below iRule that works fine for my port 80 work. Please suggest what to append to redirect traffic to https otherwise. Redirect to https should be based on [HTTP::host]
when HTTP_REQUEST {
switch -glob [HTTP::host][HTTP::uri] {
"sample1.ehosts.net/word1/word2*" { pool sample1.ehosts.net_word }
"sample2.ehosts.net/word1/word2*" { pool sample2.ehosts.net_word }
"sample3.ehosts.net/word1/word2*" { pool sample3.ehosts.net_word }
}
}