Forum Discussion
T_Rajneesh
Nimbostratus
May 07, 2019irule redirect to new website
Hi The below i-rule is working fine for redirection to new website. But when user types, abc.com or abc.com/support it is not redirecting and throwing up error 404. can you please help me make correction to below irule to achieve above said functionality.
Thanking you in advance
when HTTP_REQUEST {
set newHost "www.xyz.com"
if {[string tolower [HTTP::host]] eq "www.abc.com"} {
switch [string tolower [HTTP::uri]] {
"/support" {
HTTP::redirect "http://$newHost/en-us/abc-abc-abc-abc-faqs"
}
"/" {
HTTP::redirect "http://$newHost/en-us/family/abc"
}
}
}
}
1 Reply
- Samir_Jha_52506
Noctilucent
Add one more
condition in existing iRule.ORwhen HTTP_REQUEST { set newHost "www.xyz.com" if {([string tolower [HTTP::host]] eq "www.abc.com")||([string tolower [HTTP::host]] eq "abc.com") } { switch [string tolower [HTTP::uri]] { "/support" { HTTP::redirect "http://$newHost/en-us/abc-abc-abc-abc-faqs" } "/" { HTTP::redirect "http://$newHost/en-us/family/abc" } } } }
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
