Forum Discussion
youssef1
May 02, 2016Cumulonimbus
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