Forum Discussion
how to redirect host and uri on different location.
Hi,
can you instruct how to redirect host and host/uri to the different redirect?
for example:
https://www.abc.com redirect to https://www.newsite.com/
but when we have
https://www.abc.com/any_other_uri (any other uri below www.abc.com/ "for example www.abc.com/subscribe") it should redirect to https://www.newsite.com/legacy/any_other_uri.
I appreciate any help.
- Hien_TruongCirrus
this is my irule but it is not work as expect:
when HTTP_REQUEST {
if { (([HTTP::host] eq "www.abc.com") || ([HTTP::host] eq "abc.com")) && (([string tolower [HTTP::uri]] starts_with "/"))}
{HTTP::redirect "https://www.newsite.com/legacy[HTTP::uri]"}
else
{HTTP::redirect "https://www.newsite.com"}
}
Recent Discussions
Related Content
* 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