Magento Redirection after Store URL Changed

I recently ran into an issue where a Magento site that had been duplicated for development kept redirecting to the original site URL. Turned out that the culprit was a setting called SSL_OFFLOADED which needed to be turned off.