title: App Engine on page refresh gives 404 for my angular2 project?
body: <p>The question is very similar to <a href="https://stackoverflow.com/questions/39312010/how-do-i-make-angular-2-routing-work-with-app-engine-on-page-refresh">How do I make Angular 2 routing work with App Engine on page refresh?</a> but I do not have enough points to comment and it says not to put questions in answers.</p>
  
  <p>Anyway same problem except it's a static hosted site on appspot with angular cli dist folder being used:</p>
  
  <pre><code>Project
  |
  +--dist
     |
     +--index.html
     +--inline.js
     +--inline.map
     +--main.bundle.js
     +--main.map
     +--styles.bundle.js
     +--styles.map
  
  +--app.yaml
  +--index.yaml
  </code></pre>
  
  <p>I tried changing my app.yaml to something similar to Dan's answer linked above but can't work it out? Here is the app.yaml file:</p>
  
  <pre><code>application: 
  version: 
  runtime: python27
  threadsafe: true
  api_version: 1
  
  handlers:
  - url: /(.*\.js)
    static_files: dist/\1
    upload: dist/(.*\.js)
  
  - url: /(.*\.map)
    mime_type: application/octet-stream
    static_files: dist/\1
    upload: dist/(.*\.map)
  
  - url: /
    static_files: dist/index.html
    upload: dist/index.html
  
  - url: /(.*)
    static_files: dist/\1
    upload: dist/(.*)
  </code></pre>
  
  <p>Thanks</p>