title: Flask static file giving 404
body: <h2>Code in <code>main.py</code> file:</h2>
  <pre><code>from flask import Flask, render_template, send_from_directory
  app = Flask(__name__, static_url_path=&quot;&quot;)
  app._static_folder = &quot;static&quot;
  
  @app.route(&quot;/&quot;)
  def root():
      return app.send_static_file(&quot;index.html&quot;)
  
  @app.route(&quot;/about&quot;)
  def about():
      return app.send_static_file(&quot;about/index.html&quot;)
  
  @app.route(&quot;/projects&quot;)
  def projects():
      return app.send_static_file(&quot;projects/index.html&quot;)
  
  #snip
  
  if __name__ == &quot;__main__&quot;:
      app.run(host=&quot;0.0.0.0&quot;)
  </code></pre>
  <p>When I go to the root directory or the <code>/about</code> directory it works fine, but when I try to go to the <code>/projects</code> directory, I got the error:</p>
  <h3>Error message:</h3>
  <blockquote>
  <p>Not Found</p>
  <p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
  </blockquote>