0

I know how to redirect from:

http example.com to https www.example.com and http www.example.com to https www.example.com

but don't know how to redirect from:

https example.com to https www.example.com in Haproxy

redirect prefix https://www.example.com code 301 if { hdr(host) -i example.com } in both frontend

1 Answer 1

1
frontend weblb bind *:80 acl is_www hdr_beg(host) ilanni.com redirect prefix https://www.ilanni.com code 301 if is_www acl is_host hdr_beg(host) wwww.ilanni.com redirect scheme https if !{ ssl_fc } bind *:443 ssl crt /etc/haproxy/ilanni.com.pem use_backend sellerserver if is_host backend sellerserver balance source server web1 127.0.0.1:8111 maxconn 1024 weight 3 check inter 2000 rise 2 fall 3 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.