title: Redirect to a different port keeping all the rest
body: <p>On the server (embedded Jetty), I need to redirect to a different port leaving everything else unchanged, e.g., redirect from</p>
  
  <pre><code>http://com.example.myserver:1234/whatever?with=params#and-hash?and=whoknowswhat
  </code></pre>
  
  <p>to</p>
  
  <pre><code>http://com.example.myserver:5678/whatever?with=params#and-hash?and=whoknowswhat
  </code></pre>
  
  <p>It look like I have to compose the resulting URL from things I don't really know:</p>
  
  <ul>
  <li>the name of the server the browser used</li>
  <li>the remaining part of the URL</li>
  </ul>