Thanks for this, also fixed mine after an hour of tearing my hair out!
I don’t understand why this is an issue though – going to /index.htm on my blog now gives a 404, when before it redirected (thanks to a 301 in my .htaccess) to /index.php.
So, any links to index.htm now point to a 404 instead of my homepage. Is there any way round this?