Forum Discussion

Alyson_160947's avatar
Alyson_160947
Icon for Nimbostratus rankNimbostratus
Jun 16, 2014
Solved

HTTPS getting the uri

I'm trying to do a redirect with iRules that if user goes to https://xxx.xxx/bob it goes to another site. However it doesn't works. It only works if the users goes to http://xxx.xxx/bob. Do you have to do something special for https sites?

 

when HTTP_REQUEST {

 

if { [HTTP::uri] ends_with "bob" }

 

"HTTP::redirect "http://www.google.com" }}

 

  • You must apply the iRule to a virtual server that is handling https traffic. Eg that is on port 443.

     

4 Replies

  • You must apply the iRule to a virtual server that is handling https traffic. Eg that is on port 443.

     

    • Cory_50405's avatar
      Cory_50405
      Icon for Noctilucent rankNoctilucent
      In addition, you'll need to ensure that 443 virtual server is terminating SSL (has a client SSL profile applied to it).
    • Kevin_Davies_40's avatar
      Kevin_Davies_40
      Icon for Nacreous rankNacreous
      Cory is right. It will need to have a HTTP profile attached as well so your HTTP_REQUEST event is triggered.