Problem with database Wordpress [Deploy | Realocate | URLs]

wordpress
mysql
database

#1

I have migrated a wordpress site off of my server onto Cloud9 IDE, I have then used Search and replace to change the URL from http://www.domain.com to https://project-c9-username.c9.io

Now when I run the site I have a redirect loop.

I have searched all over the internet for a solution, most attempts to solve this issue involve changing the .htaccess file, however this does not seem to be the issue. I have made a working .htaccess and it makes no difference.

I am very confused as I have moved wordpress sites before and had no issues.