Wei
You need to create a url template, for example, when you receive a request in myapp , you will parse the remaining URL and display a message.
eg
File helloworld/app.yaml
application: helloworld version: 1 runtime: python api_version: 1 handlers: - url: /.* script: helloworld.py
File helloworld/helloworld.py
from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self, url=None): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Happy New Year '+str(url))
This way it will handle everything you request in /myapp/year/ , so from this you should get the value after /myapp/ and display the year.
Note. Make your long url yours so you understand how it will work :).
source share