Forum Discussion
jgoetsch_236444
Nimbostratus
Dec 10, 2015Getting 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 variou...
Kai_Wilke
MVP
Dec 10, 2015Hi Jgoetsch,
If the casesensitivy is the only problem, then you may want to format the HTTP::uri string tolower before evaluating the old "solutions/starter-kit" condition.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "solutions/starter-kit" } then {
HTTP::redirect https://www.bittitan.com/starter-kit
}
}
Alternativly you may want to explicitly exempt the correct URI from becomming redirected again.
when HTTP_REQUEST {
set low_uri [string tolower [HTTP::uri]]
if { $low_uri starts_with "/starter-kit" } then {
Do nothing
} elseif { $low_uri contains "/starter-kit" } then {
HTTP::redirect https://www.bittitan.com/starter-kit
}
}
Cheers, Kai
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects