title: How to configure app.yaml on GAE with PHP
body: <p>I'm getting stuck in configuring app.yaml on GAE in order to redirect in PHP code. I'd like to redirect to another HTML page called thanks.html in thanks/thanks.html directory after pushing submit button in index.php. However, it redirects to index.php from index.php With the current settings. I think PHP code don't detect my thanks.html. So I'd like to ask you what point is wrong on my app.yaml and should I use dispatch.yaml ?? Thank you so much . Except redirecting, other functions are working fine.</p>
  <p>my directory structure is
  <a href="https://i.stack.imgur.com/WhvrM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WhvrM.png" alt="enter image description here" /></a></p>
  <pre><code>index.php(only the part of redirect to thanks.html)
  
  header(&quot;Location: ./thanks/thanks.html&quot;);
  exit();
  </code></pre>
  <pre><code>app.yaml
  
  runtime: php72
  handlers:
  - url: /(.*\.(gif|png|jpg))$
    static_files: \1
    upload: .+\.(gif|png|jpg)$
  
  - url: /css
    static_dir: css
  
  - url: /js
    static_dir: js
  
  - url: .*
    script: auto
    http_headers:
  
  - url: /thanks
    static_dir: /thanks
  
  env_variables:
          SENDGRID_API_KEY: &quot;*********&quot;
          DEVELOPER_EMAIL: &quot;********&quot; 
  
  </code></pre>