Solution:
To prevent the Rewrite loop, you can use the following :
RewriteEngine on
#stop internal redirection
RewriteCond %{ENV_REDIRECT_STATUS} 200
RewriteRule ^ - [L]
#Redirect /foo.html to /foo.php
RewriteRule ^(.*?)\.html?$ /$1.php [L,R]
Replace both RedirectMatch and RewriteRule with the above Rules