I'm moving an old html site to Wordpress. The site structure looked like:
http://example.com/index.htmlhttp://example.com/about.htmlhttp://example.com/contact.html
And in WordPress it now looks like:
https://example.com/https://example.com/about/https://example.com/contact/
This is my .htaccess file
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Redirect 301 /index.html https://example.com/
Redirect 301 /about.html https://example.com/about/
Redirect 301 /contact.html https://example.com/contact/
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
(Edited here to correct the error I'm getting)
This works, except http://example.com/index.html 301 redirects to https://example.com/index.html, then repeatedly 301 redirects to https://example.com/ until it times out.
The Redirect 301 /index.html https://example.com/ gets ignored whether I place it where it is, or above the RewriteRule line.
The other redirects that work do a 301 redirect from http://example.com/about.html to https://example.com/about.html then another 301 redirect to https://example.com/about/ (200 OK).
How can I redirect http://example.com/index.html to https://example.com?