title: Remove from URL haproxy
body: <p>I have an haproxy server and I need it to rewrite the URL.</p>
  
  <p>For example, I have a url that is like this:</p>
  
  <pre><code>http://myserver.com/UserName/signalr/.....
  </code></pre>
  
  <p>and I need to remove the UserName, so when haproxy forwards to the server the url becomes:</p>
  
  <pre><code>http://myserver.com/signalr/.....
  </code></pre>
  
  <p>if I know the UserName then this works:</p>
  
  <pre><code>reqrep ^([^\ ]*\ /)UserName[/]?(.*)     \1\2
  </code></pre>
  
  <p>My problem is that the UserName is not a static, but always in the same place in the URL, directly after the domain.</p>
  
  <p>Any help appreciated.</p>