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

Ema's avatar
Ema
Icon for Nimbostratus rankNimbostratus
Aug 23, 2019
Solved

Irule for www removal on https

I would like to remove the www from the url but is having some issues with the code on one of my vip. I currently have 2 vips: 1 is for http redirection to https with that includes the www ...
  • Enes_Afsin_Al's avatar
    Aug 29, 2019

    Hi,

    Can you try this iRule in browser's incognito mode?

    when HTTP_REQUEST {
        if {[string tolower [HTTP::host]] starts_with "www."}{
            log local0. "hostname = [HTTP::host]"
            HTTP::redirect "https://[substr [HTTP::host] 4][HTTP::uri]"
        }
    }