Hi,
you can try this code:
when HTTP_REQUEST {
if { [HTTP::host] equals "old-domain.com" } {
HTTP::redirect "https://new-domain.com"
} elseif { [HTTP::uri] equals "/" } {
HTTP::uri "/irj/portal"
}
}
For your information, URI never equals "". it always starts with / even if the browser does not display it.
I recommend to redirect to /irj/portal instead of changing URI:
when HTTP_REQUEST {
if { [HTTP::host] equals "old-domain.com" } {
HTTP::redirect "https://new-domain.com"
} elseif { [HTTP::uri] equals "/" } {
HTTP::redirect "/irj/portal"
}
}