我做了一个网站,我暂时在应用程序引擎中托管。当我打开计算机上的HTML文件时,我可以浏览页面。它只有当我前往http://www.alshafarconstruction.appspot.com/index.html时才会失败。在服务器上找不到请求的网址错误
错误消息:
Error: Not Found
The requested URL /contact.html was not found on this server
的app.yaml:
application: alshafarnew
version: 1
runtime: python
api_version: 1
handlers:
- url: /(.*\.(gif|png|jpg|ico|js|css|swf|xml))
static_files: \1
upload: (.*\.(gif|png|jpg|ico|js|css|swf|xml))
- url: /(.*\.html)
static_files: \1
upload: index.html
- url: /.*
script: main.py
main.py:
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class IndexHandler(webapp.RequestHandler):
def get(self):
if self.request.url.endswith('/'):
path = '%sindex.html'%self.request.url
self.redirect(path)
def post(self):
self.get()
application = webapp.WSGIApplication([('/.*', IndexHandler)], debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
我检查了dashb oard,并发现HTML文件在那里。我是网站部署和设计的新手。任何人都可以提出可能的错我已经访问过很多网站寻求解决方案。
在仪表板中,是否有预置“contact.html”页面的新链接?如果你点击它,你会得到什么样的URL? –
可能是一个想法,粘贴为管理路由你的app.yaml等 –
@PaulCollingwood已经张贴aslso作为更新用了我的问题 –