我正在制作一个部分php网站,但是当我访问php页面时,它只是下载它。所以我读到这可能是由于app.yaml文件中的mime_type错误造成的。我意识到我没有添加它,现在我拥有它后给了我这个错误: google.appengine.api.yaml_errors.EventError:未知的网址处理程序类型。
请记住,我对这些东西都很新。
YAML文件代码:
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
答案 0 :(得分:0)
按顺序应用url
模式。要获得所需的结果,请重新排列它们,以便最具体的模式出现在最不具体的模式之前。正如您现在所做的那样,/static
将在/static/s/.*