Fortunately, I was able to turn all my .php extensions to .html by writing a new piece of code, that strangely works on 000webhost but not on XAMPP.
The code I used is as follows:
RewriteRule ^([^.]+).html$ /$1.php [QSA,L]
This will hopefully solve your problems. Do not forget that your .htaccess file needs to be uploaded to public_html folder and not to the root.