Forum Discussion
Gary_Bristol_19
Nimbostratus
Oct 08, 2015I am really bad at this,
I am attempting to incorporate some previous examples into a iRule that will do the following as I can't see to get a Data group File to work.
what i need to do is the following
I have attempted to ...
Brad_Parker
Cirrus
Oct 08, 2015Give this a try. Its a lot like Michael J's, but a little tweaking:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"lms.ou.edu" { HTTP::redirect "http://learn.ou.edu" }
"survey.ou.edu" { HTTP::redirect "https://ousurvey.qualtrics.com" }
"tutoring.ou.edu" { HTTP::redirect "http://www.ou.edu/graduatesooner/resources/tutoring.html" }
"webapps.ou.edu" {
switch -glob [string tolower [HTTP::uri]] {
"/alerts*" { HTTP::redirect "http://www.ou.edu/ouit/help/alerts" }
"/elections*" { HTTP::redirect "https://orgsync.com/122675/chapter" }
"/hsp*" { HTTP::redirect "http://www.ou.edu/hsp.html" }
"/it/identity*" { HTTP::redirect "http://www.ou.edu/content/ouit/security/top10/safeguard_your_personalinformation.html" }
"/it/newstudents*" { HTTP::redirect "http://www.ou.edu/ouit/new.html" }
"/it*" { HTTP::redirect "http://www.ou.edu/ouit" }
"/security*" { HTTP::redirect "http://www.ou.edu/ouit/security" }
"/studentservices*" { HTTP::redirect "http://www.ou.edu/ouit/aud/students" }
"/students*" { HTTP::redirect "http://www.ou.edu/ouit/aud/students" }
"/support*" { HTTP::redirect "http://www.ou.edu/content/ouit/help/personal.html" }
"/virtualtour*" { HTTP::redirect "http://www.ou.edu/map" }
}
}
}
}
You could also use a LTM policy that uses "Best-Match" rather han "First-Match" is you wanted to go that route.
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