After creating the enhanced .htaccess file using the .htaccess maker, I am getting an infinite loop (too many redirects).
On configuration.php, $live_site = '';
I also made sure that non-www to www rules were not added, since they are already set in the reverse proxy behind which the website is running.
The site is hosted in a containerised environment not directly accessible.
Requests are handled by an instance of Nginx acting as reverse proxy, which then forwards them to an Apache backend.