HTTP to HTTPS Redirection excluding specific HTTP URL

Hi - I have a requirement for following scenario;

Website configured on ASM : Default HTTP to HTTPS redirection;

http://www.abc.com > redirects > https://www.abc.com

Is it possible to redirect from HTTP to HTTPS and EXCLUDE URL from this redirect?

Hello Omar,

Try the following irule, if starting with “/xyz/ghq.asmx” it will not redirect, otherwise it will redirect to https.

when HTTP_REQUEST {

    if { ! ( [string tolower [HTTP::uri]] starts_with "/xyz/ghq.asmx" ) } {
        HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
    }

}

Hope it helps

Waiting for you feedback thanks