的目錄結構是 -無法讀取根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
謝謝。意思是說。 :) –