title: URL Rewriting using undertow file handler
body: <p>I'm currently trying to use an URL rewrite for content I delivered via a file handler from local file system. There doesn't seems to be a documentation and/or functionality for this. I guess I would work fine using a war file (as answered in this forum <a href="https://developer.jboss.org/message/915980" rel="nofollow">https://developer.jboss.org/message/915980</a>) but unluckily this does not work for my stuff.</p>
  
  <p>My configuration looks like this</p>
  
  <pre><code>&lt;server name="default-server"&gt;
      &lt;http-listener name="default" socket-binding="http" max-post-size="51200000" max-parameters="10000"/&gt;
      &lt;https-listener name="https" socket-binding="https" max-post-size="51200000" max-parameters="10000" security-realm="UndertowRealm"/&gt;
      &lt;host name="default-host" alias="localhost"&gt;
          &lt;location name="/" handler="welcome-content"/&gt;
          &lt;access-log rotate="true"/&gt;
          &lt;filter-ref name="server-header"/&gt;
          &lt;filter-ref name="x-powered-by-header"/&gt;
          &lt;filter-ref name="connection"/&gt;
      &lt;/host&gt;
  &lt;/server&gt;
  &lt;servlet-container name="default"&gt;
      &lt;jsp-config/&gt;
  &lt;/servlet-container&gt;
  &lt;handlers&gt;
      &lt;file name="welcome-content" path="C:/path/to/private/docroot"/&gt;
  &lt;/handlers&gt;
  </code></pre>
  
  <p>I tried to rebuild my docroot, that it looks like an exposed .war file, so I could add a <code>WEB-INF/undertow-handler.conf</code> file, containing the simply following rule:</p>
  
  <p><code>regex['/Deploy/stuff/laptop/windows/(.*)/update.xml'] -&gt; rewrite['/Deploy/stuff/laptop/windows/new-update.xml']</code></p>
  
  <p>but this file and/or rule seems to be plainly ignored.</p>
  
  <p>Any help is greatly appreciated.</p>