Forum Discussion

Matthew_Hutchin's avatar
Matthew_Hutchin
Icon for Nimbostratus rankNimbostratus
Apr 09, 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?

 

  • 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.