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

Jon_Singh's avatar
Jon_Singh
Icon for Altostratus rankAltostratus
Jul 12, 2019

Direct all URI's back to only the host

Trying to direct all URI's back to host, can I do something like this?

when HTTP_REQUEST {
   if ([HTTP::uri] == * ) }{
   HTTP::redirect http://website.com
   }
}   

1 Reply

  • You can. But this have some side effects. It shows only root page without jpegs, css, js files unless you do them inline. the correct version of the iRule:

    when HTTP_REQUEST {
       if { not ( [HTTP::uri] eq "/" ) }{
       HTTP::redirect http://website.com
       }
    }