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 11, 2015Hi Jgoetsch,
the previously provided iRule wasn't meant to change the URI on its way to the real server. The [string tolower] command was just included to make the URI comparsion more acurate.
I've updated the rule to reflect your last requirements....
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/starter-kit"
}
}
Hope this helps... 😉
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