RewriteCond %{HTTPS} on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ https://example.com/ [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.html\ HTTP/
RewriteRule ^index.html$ https://example.com/ [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ / [R=301,L]
curl -I https://example.com/index.html
HTTP/1.1 301 Moved Permanently
Server: nginx/1.16.1
Date: Thu, 30 Sep 2021 07:32:53 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: http://www.example.com/
Вы только для этих целей хотите linux?