I would like to know if there is a catch all solution to just redirect any Incoming HTTP traffic from source URL to the same Destination URL via the same protocol HTTP. Same with HTTPS -> HTTPS, i.e. https://foo.bar redirect to https://foo.bar
This must include all subdomains also ... *.foo.bar
2/21/2016 -- Update
I am running a 4 to 6 relay Proxy with v4 fallback. The host will send an http or https request via IPv4, reaches haproxy server which then redirects to the same URL's IPv6 address invoking the "resolve-prefer ipv6" parameter.
I currently have this working for individual URL's but I want a catch all solution for host URL ANY use server {same as host URL}.
Here is a snippet of my current configuration for example:
frontend f_catchall_http
bind 127.0.0.1:80
bind 2001:19f0:4009:4083:5400:ff:fe1e:2a1f:80
mode http
option httplog
capture request header Host len 50
capture request header User-Agent len 150
default_backend b_deadend_http
use_backend b_catchall_http if { hdr_dom(host) -i example.com }
backend b_catchall_http
mode http
option httplog
option accept-invalid-http-response
use-server example.com if { hdr_dom(host) -i example.com }
server example.com hulu.com:80 check resolvers mydns resolve-prefer ipv6 inter 10s fastinter 2s downinter 2s fall 1800
frontend f_catchall_https
bind 127.0.0.1:443
bind 2001:19f0:4009:4083:5400:ff:fe1e:2a1f:443
mode tcp
option tcplog
tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }
default_backend b_deadend_https
use_backend b_catchall_https if { req_ssl_sni -i example.com }
backend b_catchall_https
mode tcp
option tcplog
use-server example.com if { req_ssl_sni -i example.com }
server example.com example.com:443 check resolvers mydns resolve-prefer ipv6 inter 10s fastinter 2s downinter 2s fall 1800
0 Answers