Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4718

Haproxy redirections with ssl

$
0
0

@bend66 wrote:

Hey,
I have a problem configuring haproxy.
I have the following scenario.
I have the site site.com that runs behing haproxy and I want to redirect
http[://]site -> https[://]www[dot]site
http[://]www.site -> https[://]www[dot]site
https[://]site ->https[://]www[dot]site

I have two frontends (one for http and one for https)

in frontend-http I have the following:
redirect scheme https code 301 if { hdr(host) -i www[dot]site } !{ssl_fc}
redirect prefix https://www[dot]site code 301 if { { hdr(host) -i site }

but the https[://]site does not work, all other redirections work correclty.

Thanks for the help

PS: sorry for the weird URLs but I can't put URLs (I'm a new user)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4718

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>