Facing sporadic issue with the redirection
Hi, we are facing sporadic issue with the redirection on "HTTP". Some times redirection works but sometimes it gives page not displayed.
Rule xyz-irule
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host][HTTP::uri]] { "/abc" {HTTP::redirect "https://abc.xyz.com"} "/def" {HTTP::redirect "https://def.xyz.com"} "/ghi" {HTTP::redirect "https://ghi.xyz.com"} "*" {HTTP::redirect "http://www.test.xyz.com"}
IRules sequence iRules: xyz-irule : http_to_https_redirect : x-forwarding_Rule
I know 2nd rule is not applicable in this case because we have used "*" in first Rule, and not sure if X-Forwording rule is trying something which fails request sometimes.
rule x-forwarding_Rule
when HTTP_REQUEST { HTTP::header insert X-Forwarded-For [IP::remote_addr] } }