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

Matthew_Hutchin's avatar
Matthew_Hutchin
Icon for Nimbostratus rankNimbostratus
Apr 08, 2018

An iRule that uses a catch all for redirects?

Has anyone seen or done anything like this before?

 

when HTTP_REQUEST { if {[HTTP::host] ne "abc.com"} { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }

 

Can you even do this?

 

2 Replies

  • Hi,

     

    Thanks for replying to me. So they a URL "abc.com" and it matches - go to that but if it doesn't match just use what was entered and use that http://[HTTP::host][HTTP::uri]

     

    I don't see another way to do it. Any help is greatly appreciated.