Forum Discussion

cory_hase_69275's avatar
cory_hase_69275
Icon for Nimbostratus rankNimbostratus
Jun 03, 2008

http to https redirect for vip unless uri contains "vip"

I have a vip with a http to https redirect irule on it, I need to have user traffic that hits that vip and contains "vip" in the uri to not redirect. I know this must be easy, can any one help?

 

 

Thanks a ton

1 Reply

  • Something like this?

     
     when HTTP_REQUEST { 
      
        log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] [HTTP::host][HTTP::uri]" 
      
         Check if URI doesn't contain "vip" 
        if {not ([HTTP::uri] contains "vip")}{ 
      
            Redirect client to https 
           log local0. "[IP::client_addr]:[TCP::client_port]: redirecting to https://[HTTP::host][HTTP::uri]" 
           HTTP::redirect https://[HTTP::host][HTTP::uri] 
        } 
     } 
     

    Aaron