Magento – Magento Redirecting to localhost

magento-1.9migrationmultistoreredirect

I migrated my magento project (magento version 1.9.1 ) to live server. But when I try to access the live site, it gets redirected to localhost. I have followed everything I could find regarding this issues like:

  1. changed the secure/insecure base_url values in core_config_data table.
  2. deleted all the contents of /var/ folder
  3. cleared browser cache
  4. modified the permission of /var/ folder to 777
  5. changed the database name, username and password in local.xml file.

Still the problem is not solve.

Futhermore, if I try to access the backend, the login page in the live server is accessible but once I login, I get redirected to the backend of localhost or my local computer. Also, it is a multi-website projects. I have two websites for national and international clients.

What am I missing here?

Best Answer

Look in the /tmp/ folder (the one on the root of the server, not the one in your vhosts document root) and see if there is a magento folder. If there is, delete it, your cache is stored here if your webserver didn't have write access to var/cache on first request.

If that doesn't work, try running the query SELECT * FROM core_config_data WHERE value LIKE 'http%'; incase you missed one of the URL settings.