title: Firebase Hosting Route ReWrites (Abnormal Paths)
body: <p>I'm trying to create a firebase routing rule that will re-route any request under a specific sub-directory to one particular file on the server.</p>
  <p>This works if I have a normal filepath (with an extension), but does not seem to work if I have removed the extension from the initial request.</p>
  <p>Is anyone aware of how this sort of 'rewrite' logic works and is there a way to leverage in this manner?</p>
  <p>(or am i just doing this wrong, since it's not clear to me why the first rule doesn't work either)</p>
  <p>Using this rule-set:</p>
  <pre><code>    &quot;rewrites&quot;: [
        {
          &quot;source&quot;: &quot;/access-token/somefolder/else.html&quot;,
          &quot;destination&quot;: &quot;/access-token/2.json&quot;
        },
        {
          &quot;regex&quot;: &quot;^/access-token/[\\d]+$&quot;,
          &quot;destination&quot;: &quot;/access-token/2.json&quot;
        },
        {
          &quot;regex&quot;: &quot;^/access-token/[\\d]+\\.json$&quot;,
          &quot;destination&quot;: &quot;/access-token/1.json&quot;
        },
        {
          &quot;source&quot;: &quot;**&quot;,
          &quot;destination&quot;: &quot;/index.html&quot;
        }
      ]
  </code></pre>
  <p>Results of testing:</p>
  <pre><code>request : https://[root]//access-token/somefolder/else.html   &lt;-- this path does not exist, i was only using this as a test
  expected: routes to 'destination'
  actual  : routes to root (probably hitting final rule?)
  
  
  request : https://[root]/access-token/12
  expected: routes to 'destination'
  actual  : routes to &quot;404 not found&quot;
  
  
  request : https://[root]/access-token/12.json
  expected: routes to 'destination'
  actual  : re-routes as intended
  
  </code></pre>