Irule Redirection URL

Hi,

We would like to redirect from "https://apac.com/cit/* to ";

Please assist with this iRule

Thank you

I hope it should work with below iRule, Please correct me if am wrong. when HTTP_REQUEST { if { [HTTP::uri] eq “/” } { HTTP::redirect "; } }

Try below

when HTTP_REQUEST {
    if { [HTTP::host] equals "abc.com" and [HTTP::uri] starts_with "/cit/*" } {
        HTTP::redirect "https://[HTTP::host]/Cit/RDC/default.htm"
    }
}

Hi,

you can do it with a Local trafic policy instead of irule (Policies only support 302 redirect, not 301)

or you can correct your irule to :

when HTTP_REQUEST {
    if { [HTTP::host] equals "apac.com" and [string tolower [HTTP::uri]] starts_with "/cit" } {
        HTTP::redirect "https://abc.com/Cit/RDC/default.htm"
    }
}