Forum Discussion
Getting Too Many Redirects error: What is wrong with this iRule?
Hi Kai,
I greatly appreciate your responsiveness!
I've put in the below iRule:
when HTTP_REQUEST {
set low_uri [string tolower [HTTP::uri]]
if { [HTTP::uri] equals "/starter-kit" } then {
Do nothing
} elseif { $low_uri equals "/starter-kit" } then {
HTTP::uri $low_uri
} elseif { $low_uri contains "solutions/starter-kit" } then {
HTTP::redirect "https://www.bittitan.com/azure-starter-kit"
}
}
Results: 1) GOOD - Properly redirects https://www.bittitan.com/solutions/azure-starter-kit to https://www.bittitan.com/azure-starter-kit
2) GOOD - Properly displays https://www.bittitan.com/azure-starter-kit (no too many redirects error)
3) BAD - Still not redirecting URIs with upper-case characters, i.e: https://www.bittitan.com/Azure-starter-kit
NOTE: it is properly redirecting upper case in the 'solutions' portion: i.e.: https://www.bittitan.com/SOLUTIONS/azure-starter-kit to https://www.bittitan.com/azure-starter-kit
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