的目录结构是 -无法读取根html(/index.html)。返回404
MyApplication (Project Dir)
-static
--inside static, I got different dirs containing images, css, htmls, etc
-some other dirs
-app.yaml
-index.py
-index.html
的app.yaml是 -的内容
application: MyApplicationID
version: 1
runtime: python
api_version: 1
handlers:
- url: /favicon.ico
static_files: static/images/favicon.ico
upload: static/images/favicon.ico
mime_type: image/x-icon
- url: /robots.txt
static_files: static/robots.txt
upload: static/robots.txt
- url: /static
static_dir: static
secure: optional
- url: /projects
static_dir: projects
secure: optional
- url: /about
static_dir: about
secure: optional
- url:/
static_files: index.html
upload: index.html
- url: /.*
script: index.py
secure: optional
一切正常,只是如果在html页面的任何重定向到“ index.html“让我找不到页面(”GET /index.html HTTP/1.1“404 -)错误。我试过这个 - https://gist.github.com/873098但仍然没有运气。我尝试了其他线程的其他建议,但仍然没有运气。如果我删除- url:/仍然没有运气。请指教。
没有工作,我不想有像http://myURL.com/some_dir/index.html –
dir你是误会!您的计算机上的目录与用于检索它的目录无关。这就是' - url:'行的设置。 – agf
谢谢。意思是说。 :) –