URL redirect to subdomain


#1

Hello friends, how are you?

Today we changed a lot of web systems and I need to keep the old urls.

The old url is like this:

system.server.com/app

The new url is:

app.server.com/app

So, the main idea is if I point to app folder to the old system.server.com, just redirect to app.server.com/app

My HAProxy is 1.5

Thanks!


#2

http://cbonte.github.io/haproxy-dconv/1.5/configuration.html#4.2-redirect%20prefix

Something like:
redirect prefix https://app.server.com/app if { hdr(host) -i system.server.com } { url_beg /app }


#3

Thanks! Also I updated to the latest 1.7 version.