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

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!

Okay. Give it a try and report back if its working out for you… :wink:

This worked perfectly. Thanks!