1

This question already has an answer here:

We are trying to replicate Magento on a test server, but inspite of following the steps the site redirects to old url

  1. Copied and installed Database and files on the new server
  2. Fixed connections on the local.xml file
  3. Reset the usecured and secured base url from the core_config_data
  4. Cleared all files in var/cache var/session and var/tmp

There is no .htaccess file, and the index.php does not do any redirect.

What could we have missed?

marked as duplicate by Marius, brentwpeterson, Amit Bera, mbalparda, MTM Oct 3 '14 at 17:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Sounds good. Restart your browser, they cache 301/302 responses. – Fabian Blechschmidt Oct 3 '14 at 11:41
  • I've tried with other browsers, it doesn't seem to work. @Marius We are duplicating but the issues we are facing seem to be specific to latest magento version. – Santosh Achari Oct 3 '14 at 11:55
  • Have you restarted apache? – brentwpeterson Oct 3 '14 at 12:33
  • @brentwpeterson, tried that. It made no changes as such. – Santosh Achari Oct 3 '14 at 12:35
  • And you don't have compiling on I am assuming – brentwpeterson Oct 3 '14 at 12:45
2
  1. open test site with incognito mode
  2. die() in the index.php to make sure the test domain is pointing to correct folder
  • It is the right folder. Works. – Santosh Achari Oct 3 '14 at 11:56
1

Some ideas:

  1. If you used ssl on the live server, make sure the new stage urls aren't still using https and that ssl usage in core_config_data is switched off. "UPDATE core_config_data SET value = 0 where path = 'web/secure/use_in_frontend' or path = 'web/secure/use_in_adminhtml)'".

  2. Besides clearing the magento cache in the file system, switch the cache off as well through "UPDATE core_cache_option SET value=0".

  3. Make sure your local.xml is configured to go directly against the DB and not some cache (like memcached). And double check it is the right DB :)

  4. Make sure ALL your unsecured and secured base urls are changed. Remember you will have several if you have several store fronts. "UPDATE core_config_data SET value = REPLACE(value, 'www','stage') where path = 'web/unsecure/base_url' or path = 'web/secure/base_url'"

Not the answer you're looking for? Browse other questions tagged or ask your own question.