Redirection

Hello Team,

I want to redirect the URL to some other URL, but it’s not working.

My requirement is, for ex

when hit the URL https://xyz.example.com

should be redirected to

https://xyz.example.com/processportal

I Had tried with the below Irule, Its is redirecting but getting error page cant reached.

when HTTP_REQUEST {

if { [HTTP::host] equals “https://xyz.example.com” } {

HTTP::redirect “https://xyz.example.com/processportal/”

}

}

After removing I-Rule, when trying to access complete URL https://xyz.example.com/processportal its working fine.

Can any one suggest any other irule, that can work.

You can try simple iRule.

when HTTP_REQUEST { 
    if { [HTTP::uri] starts_with "/" } {
        HTTP::redirect "https://xyz.example.com/processportal/"
    } 
}