1

I have an haproxy server and I need it to rewrite the URL.

For example, I have a url that is like this:

http://myserver.com/UserName/signalr/connect...

and I need to remove the UserName, so when haproxy forwards to the server the url becomes:

http://myserver.com/signalr/connect...

if I know the UserName then this works:

reqrep ^([^\ ]*\ /)UserName[/]?(.*)     \1\2

My problem is that the UserName is not a static, but always in the same place in the URL, directly after the domain.

Any help appreciated.

1 Answer 1

0

I did find a solution to this if anyone is interested

reqrep ^([^)((?:[^\/]*\/){1}[^\/]*\/(.*)     \1\2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .