Forum Discussion

Jason_40769's avatar
Icon for Nimbostratus rankNimbostratus
Jul 12, 2011

redirect that passes all other traffic

I have been trying to create an irule that will redirect the primary site from its http version to its https version but still allows http subsite traffic to pass



For example










if { [HTTP::host] == ""}{


HTTP::redirect "[http_uri]"













So if someone types i want them to go to




but if someone types i want them to go to




please advise


5 Replies

  • Hi Jason,

    So you want to redirect any request for with a URI of / to https, but leave all other requests alone? How about this then?

    when HTTP_REQUEST {
       if { "[string tolower [HTTP::host]][HTTP::uri]" eq ""}{
          HTTP::redirect ""

  • Thanks this worked great! I tried something very similar to this but i didnt try the string to lower command.