Default page ... 404 error redirecting and I want the 404 response

15 views
Skip to first unread message

Kate

unread,
Nov 13, 2011, 6:30:03 PM11/13/11
to Google App Engine
I recently deleted a page from my site as it was getting too many
inappropriate hits. I also deleted al links to it but still there are
many attempted hits coming. When the page is requested the request is
redirected to the homepage. I do not want this and cannot remember how
I set it up. Anyone have any ideas as to how I can force anyone
requesting this non existent page to get a 404.

Kate

unread,
Nov 13, 2011, 6:49:19 PM11/13/11
to google-a...@googlegroups.com
I worked it out

Using a handler

class addURLHandler(webapp.RequestHandler):
  def get(self):
    path = self.request.path
    if doRender(self,path):
        return
    self.response.out.write("<html><head><meta http-equiv=\"refresh\"   content=\"0;url=%s\"></head><body></body></html>" % ('redirectURL',))
Reply all
Reply to author
Forward
0 new messages