Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8884917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:10:53+00:00 2026-06-14T21:10:53+00:00

Below is the code of my app.yaml file. If I go to localhost:8080/ my

  • 0

Below is the code of my app.yaml file. If I go to localhost:8080/ my index.app loads correctly. If I go to localhost:8080/index.html I get a 404 error. If I go to any other page for example localhost:8080/xxxx the not_found.app loads correctly. Why am I getting a 404 Error for the /index\.html case?

Thanks!

application: myapp
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /index\.html
  script: index.app

- url: /
  script: index.app

- url: /assets
  static_dir: assets

- url: /*
  script: not_found.app

libraries:
- name: jinja2
  version: latest

Code from index.py

class MainPage(webapp2.RequestHandler):

def get(self):

template = jinja_environment.get_template(‘index.html’)

self.response.out.write(template.render(template_values))

app = webapp2.WSGIApplication([(‘/’, MainPage)],
debug=True)

The fix was located in the bolded text!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:10:54+00:00Added an answer on June 14, 2026 at 9:10 pm

    It looks like your app variable in index does not have a handler for index.html. For instance:

    app = webapp2.WSGIApplication([('/', MainPage)])
    

    If your application gets routed to index, it will look through the handlers defined and try to find a match to /index.html. In this example, if you go to /, it will work fine since that handler is defined; however if you go to index.html, GAE doesn’t know which class to call, and it therefore returns a 404. As a simple test, try

    app = webapp2.WSGIApplication([
        ('/', MainPage),
        ('/index\.html', MainPage)
    ])
    

    Since this is ostensibly a handler for anyone typing index.html or any other permutation of index., you could use something like this to capture a broader array of cases (because internally, you can just route using / if you need to):

    app = webapp2.WSGIApplication([
        ('/', MainPage),
        ('/index\..*', MainPage)
    ])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get the below error when I try to compile the below code: Terminating
I have the below code in a .Net 4 Winforms app which loads an
I use the below code to create and read my database in the app
Using the code below (from a console app I've cobbled together), I add seven
My app is almost complete. In the second snippet of code below, you will
My code is below: I am seeing that on running the app the loadWidget
Below code saying error incorreect syntax near Main INSERT INTO tbl ( 'Week', Main,
I have customized the new style for meagento notification messages in below path /app/code/core/Mage/Core/Block/Messages.php
Why doesn't Html.ActionLink work in the below code? This is a page in the
I am using the below code in my app to make a beep sound.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.