Forum Discussion
Ahmadj_283318
Nimbostratus
Aug 25, 2016Redirect many domains
Hi
I am trying to create an iRule to:
redirect (www.x.com to www.x.com/a/b/c)
and
redirect (www.y.com to www.y.com/w/d/r)
and
redirect any (a.com/z/v to domain.com)
...
JG
Cumulonimbus
Aug 25, 2016when HTTP_REQUEST {
switch -- [string tolower [HTTP::host]] {
"www.x.com" {
HTTP::redirect "https://www.x.com/a/b/c/"
}
"www.y.com" {
HTTP::redirect "https://www.y.com/w/d/r/"
}
"a.com" {
if { [HTTP::uri] starts_with "/z/v/p" } {
HTTP::redirect "https://domain.com/z/v/p"
} elseif { [HTTP::uri] starts_with "/z/v" } {
HTTP::redirect "https://a.com/"
}
}
}
}
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