The previous HTTPS redirection did not work correctly. Setup the script to only do the redirection in the HTTP part.
New release with updated HTTP/HTTPS handling.