Got https redirection to only work when deployed woohoo