我正在尝试为google appengine应用程序设置静态登录页面。但是,当我访问网站的根目录时,我得到404。它在本地工作正常只是在我部署它时不起作用。 app.html页面正常工作,因此它的登录页面无效。
这是来自app.yaml的内容
handlers:
- url: /rest/.*
script: main.py
login: required
- url: /js
static_dir: static/js
- url: /
static_files: static\index.html
upload: static\index.html
- url: /app.html
static_files: static/app.html
upload: static/app.html
login: required
- url: /.*
script: main.py
答案 0 :(得分:9)
将这些反斜杠更改为正斜杠 应该是:
- url: / static_files: static/index.html upload: static/index.html
Backslashes are escape characters。
所以你指定了一条不存在的路径。