Forum Discussion
bwilliam
Cirrus
Sep 24, 2018iRule Assistance with redirecting multiple URLs to a single URL using an existing Redirect iRule
I currently have a universal redirect and have a requirement to add the below to this irule. Since I am unfamiliar with irules I am hoping a DevCentral community expert can assist.
I need to redir...
jpeterson6_1656
Nimbostratus
Sep 24, 2018Assuming you want to keep , the following additional entry should cover the four examples you listed:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"*www.sitename.net*" {
HTTP::redirect "https://sitename.sitename.com"
}
"*sitename.com" {
HTTP::redirect "https://www.sitename.io"
}
default {
add the default action you prefer ie "www.def.com"
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
}
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
