For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Dheeraj's avatar
Dheeraj
Icon for Nimbostratus rankNimbostratus
May 28, 2019

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.

1 Reply

  • You can try simple iRule.

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