0

I have a problem with HAproxy, it won't redirect HTTP to HTTPS if using Internet Explorer. It just tells me that this webpage doesn't exist if I'm trying to connect over http.

My configuration (real website name is changed):

acl somewebsite.com_acl hdr(host) -i somewebsite.com
use_backend website if somewebsite.com_acl

backend website
        server someserver 10.0.1.50:80
        reqirep  ^(GET|POST|HEAD)\ /(.*)     \1\ /\2
        reqidel ^Host:.*
        reqadd Host:\ www.somewebsite.com
        redirect scheme https code 301 if !{ ssl_fc }

IE version: 11.805.17763.0
HAproxy version: 1.8.21 2019/08/16

There are no problems with Chrome, Firefox or Edge.

Anyone know what's causing this problem?

ginerama
  • 216
  • 1
  • 7

1 Answers1

0

Try to use:

redirect scheme https code 301 if !{ ssl_fc }

at the frontend rather than the backend. also adding the below line strict transport security

http-response set-header Strict-Transport-Security max-age=63072000

Good luck