F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

Salman_Gbadamos's avatar
Salman_Gbadamos
Icon for Nimbostratus rankNimbostratus
Nov 13, 2014

Title: Redirecting HTTP to HTTPS for an HTTPS virtual server

Dear All.

 

Please am new to iRules, but i have read a lot on this topic and i have attempted to solve this issue (as in subject) by using "https://[getfield [HTTP::host] ":" 1][HTTP::uri]" directly in the HTTPClass Profile at the "Redirect to" field.

 

I have attached this HTTPClass profile to an HTTPS Virtual Server but all HTTP requests directed to this VIP is still not working.

 

To any assistance is highly appreciated.

 

4 Replies

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus
    "I have attached this HTTPClass profile to an HTTPS Virtual Server" can I assume you mean you've added this http class profile to a HTTP virtual server
  • Try this:

     

    Create your basic virtual server (https port 443). Next create a second virtual server (http port 80) to go with it. You can make the http virtual a standard http virtual without a pool and with a standard http profile. Add an http class like this one to the http virtual server only: https://[HTTP::host][HTTP::uri]

     

    Both virtuals must use the same IP address for this to work.

     

    • Salman_Gbadamos's avatar
      Salman_Gbadamos
      Icon for Nimbostratus rankNimbostratus
      Yes, Many Thanks -- I got what the problem was, I was using the same HTTPClass profile for both the HTTP and HTTPS VS, so when i change the "redirect to" in the HTTPClass; am automatically changing it for the HTTPS VS as well, so all traffic were dropped!..........
  • Yes, Many Thanks -- I got what the problem was, I was using the same HTTPClass profile for both the HTTP and HTTPS VS, so when i change the "redirect to" in the HTTPClass; am automatically changing it for the HTTPS VS as well, so all traffic were dropped!..........