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...
Scott_82504
Nimbostratus
Nov 18, 2008I am think I am getting closer. Thanks for all the help so far. Here is the issue
Everytime it sees a jpg or css file it trys to redirect it so the jpg never comes up...it just redirects it to the default page on the bottom of the IRULE. see below
+ 0.8340.096499142GET302Redirect to http://lms2.tyco-training.com/knav/nav?BU=10003010http://lms2.tyco-training.com/knav/TKMStyleSheet/default/images/tyco_bgimage.jpg
when RULE_INIT {
set ::ForwardList [list / .html .htm .asp .pl .jpg .css]
}
when HTTP_REQUEST {
if { ( not ( \
([string tolower [HTTP::uri]] starts_with "/knav/nav") or \
([string tolower "http://[HTTP::host][HTTP::path]"] eq \
"http://lmsadmin2.tyco-training.com/assembler/dev") \
)) and ([matchclass [HTTP::path] ends_with $::ForwardList]) \
} {
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://lms2.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
