Forum Discussion

NetworkTeam_178's avatar
NetworkTeam_178
Icon for Nimbostratus rankNimbostratus
Feb 02, 2016

Redirect https://www.website.com to http://www.website.com

Hello,

 

I have 2 websites, one is an https version of the http website. The F5 is handling the SSL, I just need the F5 to redirect any request for the https version of the site to the http version.

 

So....

 

If a user navigates to https://www.website.com then they should hit http://www.website.com

 

This is so that I can work on the https website and end users won't be affected.

 

Thanks in advance

 

Brenden

 

4 Replies

  • Hi Brenden,

    you may try the snippets below...

    when HTTP_REQUEST {
        if { [string tolower [HTTP::host]] eq "www.website.com" } then {
            HTTP::redirect "http://[getfield [HTTP::host] ":" 1][HTTP::uri]"
        }
    }
    

    Note: I didn't understand "This is so that I can work on the https website and end users won't be affected." Can you explain this requirement a little further?

    Cheers, Kai

  • Basically its a customer website that they don't want customers hitting even though it will be 'online'.

     

    Thanks for the reply, I'll give this a go today!

     

    • Kai_Wilke's avatar
      Kai_Wilke
      Icon for MVP rankMVP
      Okay. Give it a try and report back if its working out for you... ;-)