Forum Discussion
Irule forwarding with various options
Hello Sokol, Now I understand your need.
So to maitain the uri you have to use the follwing irule:
when HTTP_REQUEST {
if { ([HTTP::uri] eq "/") && (([HTTP::host] eq "mysite.com") || ([HTTP::host] eq "www.mysite.com")) } {
HTTP::redirect https://www.bettersite.com/mysite/
} else {
HTTP::redirect https://www.bettersite.com[HTTP::uri]
}
}
or to do more simple:
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" } {
HTTP::redirect https://www.bettersite.com/mysite/
} else {
HTTP::redirect https://www.bettersite.com[HTTP::uri]
}
}
Regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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