Forum Discussion
Gary_Bristol_19
Nimbostratus
Aug 25, 2015need multi layer redirect
I quess I still haven't gotten the hang of writing these rules.
here is what i need to be able to accomplish
needhelp.ou.edu/library => https://ounew.service-now.com/forms/walkin_bizzell.do...
arpydays
Nimbostratus
Aug 25, 2015I would use a switch command as it's a bit more efficient, also for posting code here use the Preformatted code button on the irule text so it's more readable,
cheers
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"needhelp.ou.edu" {
switch -glob [string tolower [HTTP::uri]] {
"/" {
HTTP::redirect "http://itscnorman.ou.edu/contact/"
}
"/library*" {
HTTP::redirect "https://ounew.service-now.com/forms/walkin_bizzell.do"
}
"/couch*" {
HTTP::redirect "https://oudev.service-now.com/forms/walkin_couch.do"
}
"/el*" {
HTTP::redirect "https://oudev.service-now.com/forms/walkin_el.do"
}
"/oneu*" {
HTTP::redirect "https://oudev.service-now.com/forms/walkin_oneu.do"
}
}
}
}
}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
