Forum Discussion

jgoetsch_236444's avatar
jgoetsch_236444
Icon for Nimbostratus rankNimbostratus
Dec 10, 2015

Getting Too Many Redirects error: What is wrong with this iRule?

Hi All,

I wrote an iRule that is correctly redirecting a URL that was sent out by our marketing team that was not correct. The page URL is also case sensitive, and emails were sent out with various cases which is why the new rule was attempted. However, the new rule results in a too many redirects error.

Original rule (WORKS)

when HTTP_REQUEST {
if { [HTTP::uri] contains "solutions/starter-kit" } {
            HTTP::redirect https://www.bittitan.com/starter-kit
}

}

New Rule (DOES NOT WORK - TOO MANY REDIRECTS)

when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/starter-kit" } {
            HTTP::redirect https://www.company.com/starter-kit
}

}

12 Replies