Hemant, Am 27.11.19 um 21:37 schrieb Coscend@HAProxy: > 2.0.9 config line that worked: > > reqirep ^([^\ ]*)\ /CoscendP/*([^\ ]*)\ (.*)$ \1\ /\2\ \3 > > rspirep ^(Location:)\ (https?://([^/]*))/(.*)$ Location:\ > /CoscendP/\3 > > Corresponding 2.1.0 config line that gives errors: > > http-request replace-header ^([^\ ]*)\ /CoscendP/*([^\ ]*)\ (.*)$ > \1\ /\2\ \3
Use http-request replace-uri, because you are not matching a header: http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#4.2-http-request%20replace-uri http-request replace-uri ^/CoscendP/*([^\ ]*)\ (.*)$ \1\ /\2\ \3 > http-response replace-header ^(Location:)\ (https?://([^/]*))/(.*)$ > Location:\ /CoscendP/\3 > Specify the header name as a separate parameter. You don't need to specify it in the replacement: http-response replacer-header Location ^(https?://([^/]*))/(.*)$ /CoscendP/\3 Best regards Tim Düsterhus