Forum Discussion
mika
Cirrus
Aug 06, 2020REDIRCT HOST
Good morning! i want redirect a host to another host but with the same path, and i have many path! exmple: i have this hosts: https://www.abc.com/azer/iiokldf§123/kjiu to https://www.aze.com/aze...
Mayur_Sutare
MVP
Aug 06, 2020You can use below iRule to redirect to the mentioned host keeping same URI path. Also if you want to match other condition for URI path like starts with. You can add another elseif statement given below and write iRule. Just you need to change the order of statements according to your use case under if-elseif statements.
if { [HTTP::uri] starts_with "azqsd"} {
HTTP::redirect https://host
when HTTP_REQUEST {
if { [HTTP::host] equals "www.abc.com"} {
HTTP::redirect "https://www.aze.com[HTTP::uri]"
}
}
Hope it helps!
Mayur
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
