title: How do I redirect from "domain.com/folder/index.html" to "domain.com/folder"
body: <p>My site runs on nginx </p>
  
  <p>I have the code to redirect my root index.html to domain name but I don't know how to redirect index.html files in folders to point to the folder for 301 redirect</p>
  
  <p>example root/folder/index.html to root/folder</p>
  
  <p>this code worked in htaccess to redirect root index.html to domain name
      <code>RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
      RewriteRule ^index\.html$ http://%{HTTP_HOST}/ [R=301,L]</code></p>