Forum Discussion

Saleem_80966's avatar
Saleem_80966
Icon for Nimbostratus rankNimbostratus
Sep 24, 2009

iRule to redirect Http to https to a specific URI

I have a website that has a virtual directory that i need to run ssl. www.example.com\virtual

 

 

Currently i have the entire web site redirect to HTTPS.

 

I am look to create a new irule to redirect only www.example.com\virtual to https.

 

 

1 Reply

  • Try something like:

     
     when HTTP_REQUEST {  
           
          if { [HTTP::uri] equals '/virtual' } { 
                HTTP::redirect "https://[HTTP::host]/virtual"  
           }  
     } 
     

    HTH,

    Matt