I have a page that works with one PHP script, I have a working redirect, but since the previous version always had an index.html file at the end, I would need to redirect queries to the parent folder:
example.com/index.html -> example.com/
example.com/folder/index.html -> example.com/folder/
My current listing looks like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^.*$ https://%1/$1 [R=301,L]
RewriteCond $1 !index\.php
RewriteRule ^(.*)$ index.php [L]
And you wanted to add this, but then there's a loop
RewriteRule ^index.html$ / [L,R=301]
RewriteRule ^([a-zA-z0-9]+).html$ /$1 [L,R=301]
Please advise how to edit it? Thank you