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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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',))