Sure, what I mean, when you visit my website https://www.wheelchairway.com the same URL https://www.wheelchairway.com/index.html is also available, this is for all pages on the website.
Going by search console standards the index.html has the same content as the root UR so this is considered duplicate content. I already have setup a canonical tag in the header but the index.html is still available for people to visit.
Because I use hugo to render my website with Netlify as the backend I was looking for a way to redirect the index.html back to the root of each URL with a 301 redirect.
Something similar like the PHP version like this:
RewriteRule ^index.html$ / [R=301,L]
RewriteRule ^(.*)/index.html$ /$1/ [R=301,L]
Hope that this gives a better understanding of what I am looking to solve.