title: how to redirect to a external 404 page python flask
body: <p>I am trying to redirect my 404 to a  external URL like this:</p>
  <pre class="lang-py prettyprint-override"><code>@app.route('404')
  def http_error_handler(error):
      return flask.redirect(&quot;http://www.exemple.com/404&quot;), 404
  </code></pre>
  <p>but it does not work. I keep getting:</p>
  <blockquote>
  <p>Not Found
  The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
  </blockquote>