F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

1 Reply

  • you can use HTTP::redirect.

    HTTP::redirect wiki

    https://devcentral.f5.com/wiki/iRules.http__redirect.ashx

    e.g.

    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
    ltm virtual bar {
        destination 172.28.20.15:443
        ip-protocol tcp
        mask 255.255.255.255
        profiles {
            clientssl {
                context clientside
            }
            http { }
            tcp { }
        }
        rules {
            myrule
        }
        source 0.0.0.0/0
        vs-index 25
    }
    
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule
    ltm rule myrule {
        when HTTP_REQUEST {
      if { [HTTP::uri] equals "/" } {
        HTTP::redirect "https://abc.com"
      }
    }
    }
    
    [root@ve11a:Active:In Sync] config  curl -Ik https://172.28.20.15
    HTTP/1.0 302 Found
    Location: https://abc.com
    Server: BigIP
    Connection: Keep-Alive
    Content-Length: 0