title: spring mvc redirect path and all children to another domain
body: <p>I am trying to work out how to redirect from my webapp to another server, preserving any paths and GET vars.</p>
  
  <p>eg</p>
  
  <pre><code>www.myapp.com/foo
  foo.com
  
  www.myapp.com/foo/bar
  foo.com/bar
  
  www.myapp.com/foo?bar=1
  foo.com?bar=1
  </code></pre>
  
  <p>I would idealy just like to use something like</p>
  
  <pre><code>&lt;mvc:view-controller path="/foo/**" view-name="redirect:http://foo.com**" /&gt;
  </code></pre>