title: Google appengine rewrite question
body: <p>How can I rewrite url for python:</p>
  
  <p><a href="http://localhost:8081/?page=1" rel="nofollow">http://localhost:8081/?page=1</a></p>
  
  <p>to</p>
  
  <p><a href="http://localhost:8081/1" rel="nofollow">http://localhost:8081/1</a></p>
  
  <p>here is my code, but it's not working:</p>
  
  <pre><code>class MainPage(webapp.RequestHandler):
      def get(self, page):
          mypage = self.request.get('page')
          self.response.headers['Content-Type'] = 'text/plain'
          if mypage == "":
              self.response.out.write('Hello, webapp World!')
          else:
              self.response.out.write('page is ' + mypage)
  
  
  application = webapp.WSGIApplication([('/', MainPage),('/(\d+)', MainPage)], debug=True)
  </code></pre>