title: Flask rename final url
body: <p>I want change something like</p>
  <pre><code>page/folder_1/folder_2.../folder_n/finfolder.html
  </code></pre>
  <p>to</p>
  <pre><code>page/different_name
  </code></pre>
  <p>Code:</p>
  <pre><code>@app.route('/&lt;path:url&gt;')
  def page(url):
      return render_template('/'+url), rename(url, 'different_name')
  </code></pre>
  <p><a href="https://i.stack.imgur.com/8viC6.png" rel="nofollow noreferrer">enter image description here</a></p>