Pages

iRule redirect from HTTP to HTTPs on F5 big-ip



when HTTP_REQUEST {
       HTTP::redirect "https://[HTTP::host][HTTP::uri]"
    }

-------------------------------------------------------------------------------------------------------
Another example of redirection from http to https when it is conditional

when HTTP_REQUEST {
   set host [string tolower [HTTP::host]]
   if { ($host ends_with ".abc.com") && !($host starts_with "admin") } {
        HTTP::redirect "https://[HTTP::host][HTTP::uri]"  }
   

}

thudinh Network and Security

No comments:

Adsense

Translate