Forum Discussion
Scott_82504
Nimbostratus
Nov 15, 2008IRules Logic and wild care at the end
I am trying to figure out a set of IRULES. They are working for the most part. Here is my issue. If the rules do not match my any of my uri (kinda like a wildcard) I want to redirect the connect...
hwidjaja_37598
Altostratus
Nov 16, 2008Hmm ... This one might be more efficient:
when HTTP_REQUEST {
if {not ([string tolower [HTTP::uri]] starts_with "/knav/nav")} {
switch -glob [string tolower [HTTP::uri]] {
"/dsc*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15002958" }
"/kantech*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15002735" }
"/acvs_catalog*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?cmd=catalog&BU=15004409"}
"/acvs*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15004408"}
"/mac*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15005009"}
"/tycosafetyproducts-fire-europe*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15005089"}
"/scansource*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15004826"}
"/simplexmear*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15004867"}
"/te*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15004768"}
"/physicalsecurity*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15004506"}
"/swh*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15002734"}
"/tfbp*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15004445"}
"/scott*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15002988"}
"/bentel*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15002959"}
"/surgard*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15002959"}
"/amerdyn*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15002733"}
"/cemsys*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15002736"}
"/adtcontractors*"
{ HTTP::redirect "http://lms2.tyco-training.com/knav/nav?BU=15005329"}
default
{ HTTP::redirect "http://lms.tyco-training.com/knav/nav?BU=10003010" }
}
}
}
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
