title: google app engine app.yaml for php static files don't load
body: <p>I am very new to GAE, I can run the app locally fine, but when running on GAE browse, it complains about script.js line 1 "Unexpected token &lt;"</p>
  
  <p>Here is the app.yaml</p>
  
  <pre><code>application: randomappname
  version: 1
  runtime: php
  api_version: 1
  
  handlers:
  - url: /.*
    script: index.php
  
  - url: /(.*\.css)
    mime_type: text/css
    static_files: static/\1
    upload: static/(.*\.css)
  
  - url: /(.*\.js)
    mime_type: text/javascript
    static_files: static/\1
    upload: static/(.*\.js)
  
  # image files
  - url: /(.*\.(bmp|gif|ico|jpeg|jpg|png))
    static_files: static/\1
    upload: static/(.*\.(bmp|gif|ico|jpeg|jpg|png))
  
  - url: /(.+\.php)$
    script: \1
  </code></pre>
  
  <p>Files are referenced in the head tag</p>
  
  <pre><code>  &lt;head&gt;    
      &lt;link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet"&gt;    
      &lt;script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js"&gt;&lt;/script&gt;
      &lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.js"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" href="/static/main.css" /&gt;
      &lt;script src="/static/script.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  </code></pre>
  
  <p>Files located like this:</p>
  
  <pre><code>index.php
  api.php
  app.yaml
  /static/main.css
  /static/script.js
  </code></pre>
  
  <p><strong><em>Edit:</em></strong></p>
  
  <p>I updated the app.yaml to this:</p>
  
  <pre><code>- url: /(.+\.php)$
    script: \1
  
  - url: /static
    static_dir: static
  
  - url: /.*
    script: index.php
  </code></pre>
  
  <p>It works</p>