sreenath sreenath sreenath sreenath - 11 months ago 48
HTML Question

Requested url not found on server error

I made a website which I am temporarily hosting in app engine. I am able to navigate through the pages when I open the HTML files on my computer. It only fails when I head to

Error Message:

Error: Not Found

The requested URL /contact.html was not found on this server


application: alshafarnew
version: 1
runtime: python
api_version: 1

- 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: /.*

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


def post(self):

application = webapp.WSGIApplication([('/.*', IndexHandler)], debug=True)

def main():

if __name__ == "__main__":

I've checked the dashboard and find that the HTML files are there. I am new to website deployment and design. Can anyone suggest possible errors? I have already visited many sites for a solution.

Answer Source

The documentation hints that static and application files are uploaded separately, so while the files may be there, it might be that they're being uploaded in the application-files part.

You currently have an upload directive telling it to only upload index.html:

- url: /(.*\.html)
  static_files: \1
  upload: index.html

(actually, it's a regular expression, so it would also upload, for example index@html if it existed)
This suggests that you might want to make that regular expression match all HTML files:

- url: /(.*\.html)
  static_files: \1
  upload: .*\.html