Ok, I found that the problem was caused by undefined arrays in settings/override/site.ini.append.php. I also added ForceVirtualHost to remove index.php in the links. The site is now working with the .htaccess listed above but since index.php is no longer showing in the links I will be making a few changes.