Forum Discussion
Joe_Pipitone
Nimbostratus
Nov 12, 2009Case insensitive redirects not quite working
I have an iRule that is supposed to do simple redirection if someone types in the following:
http://www.ourdomain.org/LV2010 or http://www.ourdomain.com/lv2010
It see...
Colin_Walker_12
Nov 12, 2009Historic F5 Account
When using the starts_with command you don't need to add an asterisk. It's not a glob style match, the asterisk is implied.
So you'd want to just use:
if { [string tolower [HTTP::uri]] starts_with "/lv2010/instructors" } {
HTTP::redirect "http://subdomain.ourdomain.org/events/some-other-file-here-2010/speakers/speaker-list.aspx"
}
Keep in mind, too, that if you're listing multiple matches you'll want to go from the most specific to the least specific. This is likely why your second post is behaving the way you described. If you match for "/lv2010" then for "/lv2010/es" the first match worked, and the request was already redirected before your second comparison was even performed. If you reverse the order (specific to general) I think you'll see better behavior.
Colin
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