我似乎無法找到任何地方。附加服務HTML沒有尾隨/在文件夾中
我有一個appengine項目,只是提供html頁面。但是,只有在文件名'正確'正確時才能正確加載文件。
I.e. mywebsite.com/lastproject/負荷完美
但mywebsite.com/lastproject完全不
我希望在尾隨/留在網站正確加載加載。我錯過了什麼?
這裏是我的app.yaml
application: websitewithsubfolder
version: 1
runtime: python
api_version: 1
handlers:
- url: (.*)/
static_files: static\1/index.html
upload: static/index.html
- url:/
static_dir: static
這似乎工作正常加載源HTML,但所有的資產都被槍殺。我多次得到以下錯誤。 :錯誤2012-06-03 15:56:50,916 dev_appserver.py:1983]讀取文件「/website/static/style/style.css/index.html」時遇到錯誤: [Errno 20]不是目錄:'website /static/style/style.css/index.html' – oberbaum
@norskben我用我的應用程序中使用的一些其他示例更新了答案。 您確實需要閱讀[Google App Engine入門](https://developers.google.com/appengine/docs/python/gettingstarted/) 上面的app.yaml如果您將其修改爲您的應用程序,將會工作,但你有一個靜態的HTML頁面回答所有路線。爲了從應用程序引擎中獲得真正的好處,您需要創建一個*應用程序*。 –