Magento redirection problem after moving

后端 未结 13 903
没有蜡笔的小新
没有蜡笔的小新 2020-12-05 11:02

I\'ve moved my Magento to another server with another domain name, now it keeps linking me back to the old domain. All files and the entire database has been searched&re

相关标签:
13条回答
  • 2020-12-05 11:34

    one thing more which people easily forget in such cases. local.xml should also be modified according to the settings of backup database. Otherwise you can edit the base_url and clear the cache thousand times and you will never be directed to the url you desire :)

    0 讨论(0)
  • 2020-12-05 11:44

    in my case it's because I forgot to change the db name in app/etc/local.xml

    0 讨论(0)
  • 2020-12-05 11:50

    here is your answer:

    First step was simple – finding in the database base url value: table name is core_config_data and the keys are /web/unsecure/base_url and web/secure/base_url. Change those two to the proper values.

    Second step is also very logical – cleanup cache! Magento does cache everything, including values of config table, so go to the Magento root with FTP or SSH, remove everything from the folders var/cache/ and var/session/ and var/tmp. (You can even rename them and create a empty folder in those names).

    Hope it helps

    0 讨论(0)
  • 2020-12-05 11:52

    In my case it was config with path=payment/wayforpay_payment/merchant which has domain with dots replaced by underscores, e.g. www_yourdomain_com. After I changed it to mynewdomain_com issue was resolved.

    0 讨论(0)
  • 2020-12-05 11:53

    This is probably due to the old base url stored in the database table core_config_data. You have to update that values to point to the new domain.

    You can update with the following update queries

    UPDATE core_config_data SET value="http://www.newdomain.com/" 
    WHERE path="web/unsecure/base_url"
    

    to update secure base url

     UPDATE core_config_data SET value="https://www.newdomain.com/" 
     WHERE path="web/secure/base_url"
    
    0 讨论(0)
  • 2020-12-05 11:53

    In my case it was even more strange, on my development instance I had no "temp" folder, the cache was stored somewhere outside of site vhost, or in dB, but not in core_config_data. Only flush cache in Magento BE could help, so better to do it before dB dump.

    Best regards.

    0 讨论(0)
提交回复
热议问题