简体   繁体   中英

Google App Engine app.yaml handler error

I'm in the process of making a partially php site, yet when I visit the php page, it just downloads it. So I read that this may be due to an error in the mime_type in the app.yaml file. I realized I hadn't added that in and now when after I have it gives me this error: google.appengine.api.yaml_errors.EventError: Unknown url handler type.

Please keep in mind I am very new to most of this stuff.

YAML file code:

application: baking-tutorial
version: secureable
runtime: python27
api_version: 1
threadsafe: true

handlers:

- url: /robots\.txt
  static_files: static/robots.txt
  upload: static/robots\.txt

- url: /static
  static_dir: static
  secure: optional

- url: /main\.html
  static_files: static/\1
  upload: static/main\.html

- url: /slither\.html
  static_files: static/\1
  upload: static/slither\.html

- url: /suggest\.html
  static_files: static/\1
  upload: static/suggest\.html

- url: /static/.*
  script: mirror.app
  secure: optional

- url: /static/s/.*
  script: mirror.app
  secure: optional

- url: /.*
  script: mirror2.app
  secure: optional

- url: /static/login/access-controlled.php
  application_readable: true
  mime_type: text/html

- url: /static/login/change-pwd.php
  application_readable: true
  mime_type: text/html

- url: /static/login/confirmreg.php
  application_readable: true
  mime_type: text/html

- url: /static/login/login.php
  application_readable: true
  mime_type: text/html

- url: /static/login/login-home.php
  application_readable: true
  mime_type: text/html

- url: /static/login/logout.php
  application_readable: true
  mime_type: text/html

- url: /static/login/register.php
  application_readable: true
  mime_type: text/html

- url: /static/login/resetpwd.php
  application_readable: true
  mime_type: text/html

- url: /static/login/reset-pwd-req.php
  application_readable: true
  mime_type: text/html

The url patterns are applied in order. To get the result you want, rearrange them so that most-specific patterns appear before the least-specific ones. As you have it now, /static will match before /static/s/.*

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM