HAProxy and URL Rewriting Configuration HAProxy and URL Rewriting Configuration wordpress wordpress

HAProxy and URL Rewriting Configuration


Your regex is wrong, you're assuming the server is in the request path. To match the request paths in the headers use a regex like this one:

reqrep ^([^\ ]*)\ /lang/blog/(.*) \1\ /blog/lang/\2

you can use reqirep as well but that is only useful if your servers actually serve /BLog/lAnG/ as well.


If this still doesn't work switch to a stable version, e.g. as of now reqrep is broken in 1.5 dev. Switched to 1.4 to fix.