Forum Discussion
Joe_Pipitone
Nimbostratus
Jan 12, 2010Catch a specific URL and redirect it
I have an existing iRule which uses a switch statement to catch a request no matter the case (string tolower) and redirect.
For some reason, the iRule is not catching and redirecting - I ...
Jan 12, 2010
You are converting the URI to lower case and then comparing it to a mixed case string and that will always fail. Lower case your match string and all should be good.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/eventoverview.aspx?event=some2010" {
HTTP::redirect "http://ourothersite.com/events/event-name.aspx"
}
}
}
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
