
Ich habe das Ziel, einige URLs auf eine einzige umzuleiten. Ich meine, das hier ist die Ziel-URL:https://application.company.com
Ich möchte umleiten: http://company.com https://company.com https://application.company.com http://application.company.com http://www.application.company.com https://www.application.company.com
zu dieser Ziel-URL Was wäre am klügsten, was man in HAProxy tun könnte? Vielen Dank im Voraus
Antwort1
Ich würde eine Karte verwenden.
company.com application.company.com
www.application.company.com application.company.com
Haproxy-Konfiguration ungetestet
listen redirector
bind :::80
http-request redirect code 301 location https://application.company.com !{ ssl_fc }
http-request redirect code 301 location https://%[req.hdr(host),lower,map(domain.map)]