Temp URL Redirect Loop

I assume IP stands for your IP address. In that case you are probably blocked by hostgator, as it can’t decide based only on the IP address which account is being accessed. in addition ~username is probably a URL that isn’t configured/accessible on the server.

In other words, ask hostgator for support.

Why do you even go for this when you can simply set everything correctly on the new server and just change the IP address associated with your domain in your local localhost file?