Forum Discussion
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
- Carlos_Alperin
Nimbostratus
I have the same problem with this one:
when HTTP_REQUEST { set mst_uri [string tolower [HTTP::uri]] if {[class match [HTTP::header "User-Agent"] contains Mobile-Agents] or [$mst_uri equals "/"]} { HTTP::redirect ";} }
logs in the F5 keeps reporting invalid command "/"
Recent Discussions
Related Content
* 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