title: Zuul Routing: Static Resources Not Found Issue
body: <p>When Zuul routes a request to, say, login page, the static resources (css, js etc.) cannot be correctly located. A <code>404 Not Found</code> error will be returned.</p>
  
  <p>I have the following routing setting first:</p>
  
  <pre><code>ui:
    path: /ui/**
    url: http://serviceHost:8082/ui/
  </code></pre>
  
  <p>And it's working well. So when I visit <code>http://zuulHost/ui/login/</code>, I'll get an <code>index.jsp</code> and then the browser will request the static resources, whose paths are like:</p>
  
  <pre><code>/ui/ext/ext-dev.js
  </code></pre>
  
  <p>The browser will use <code>http://zuulHost/ui/ext/ext-dev.js</code>, for e.g, for that resource. And Zuul will route it to <code>http://serviceHost:8082/ui/ext/ext-dev.js</code> according to its setting.</p>
  
  <p>But then I want to forward the request to the root <code>/</code> path to the login page, and I added:</p>
  
  <pre><code>root:
    path: /
    url: http://serviceHost:8082/ui/login/
  </code></pre>
  
  <p>This time, after the browser gets the <code>index.jsp</code> file, it will request the resources using:</p>
  
  <pre><code>http://zuulHost/ext/ext-dev.js
  </code></pre>
  
  <p>So in this case, the context <code>/ui</code> is lost, because the browser doesn't know about it since I'm forwarding the request in zuul internally. The url in the browser is still <code>http://zuulHost</code>. And zuul won't know where to route <code>http://zuulHost/ext/ext-dev.js</code>, since there's not a match in its routing table.</p>
  
  <p>I wonder if there's a solution to it. I think it's a quite common issue when doing forwarding in proxy servers. Thanks.</p>