Magento is automatically redirecting to localhost on live server

localhost, magento, redirect

Solution

This occurs when the base link urls are not changed in the table `core_config_data` (records with the following `path` column).

web/secure/base_url
web/secure/base_link_url
web/unsecure/base_url
web/unsecure/base_link_url

You must clear the cache after changing them. This also occurs if the `var/cache` folder is not writable and the cache is written in the OS default `tmp` folder.

Problem

I have uploaded my website on live server from localhost in magento and when i m writing the url e.g: http://unbeatablewatches.com it is redirecting to localhost/unbeatable-watches.. how to solve this issue .. ? please help me

Original source