Forum Discussion
Joe_Pipitone
Nimbostratus
Nov 16, 2009HTTP Redirect using switch issue
The following iRule isn't redirecting properly - these are supposed to be going to 4 separate URIs.
I moved over to a switch statement because I was getting a similar behavior - it's as if it is catching the /lv2010/es* first. I have tried removing the asterisks, but that did not work.
Can anyone help?
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/lv2010/es/register*" {
HTTP::redirect "http://ourdomain.org/registration.aspx"
}
"/lv2010/es/hotel*" {
HTTP::redirect "http://ourdomain.org/hotel-and-travel.aspx"
}
"/lv2010/es/qualify*" {
HTTP::redirect "http://ourdomain.org/qualification.aspx"
}
"/lv2010/es*" {
HTTP::redirect "http://ourdomain.org/home.aspx"
}
"/lv2010*" {
HTTP::redirect "http://ourdomain.org/home.aspx"
}
2 Replies
- Joe_Pipitone
Nimbostratus
It appears as though the problem was the asterisk following /lv2010*. I've taken this out, and the other rules work. - Joe_Pipitone
Nimbostratus
OK - stupid me, I just added another line to catch the /lv2010/
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