title: Flask URL Route: Route Several URLs to the same function
body: <p>I am working with Flask 0.9. </p>
  
  <p>Now I want to route three urls to the same function:</p>
  
  <pre><code>/item/&lt;int:appitemid&gt;
  /item/&lt;int:appitemid&gt;/ 
  /item/&lt;int:appitemid&gt;/&lt;anything can be here&gt;
  </code></pre>
  
  <p>The <code>&lt;anything can be here&gt;</code> part will never be used in the function.</p>
  
  <p>I have to copy the same function twice to achieve this goal:</p>
  
  <pre><code>@app.route('/item/&lt;int:appitemid&gt;/')
  def show_item(appitemid):
  
  @app.route('/item/&lt;int:appitemid&gt;/&lt;path:anythingcanbehere&gt;')
  def show_item(appitemid, anythingcanbehere):
  </code></pre>
  
  <p>Will there be a better solution?</p>