Magento redirection problem after moving

后端 未结 13 902
没有蜡笔的小新
没有蜡笔的小新 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:30

    Apparently Magento used the 'temp' directory in the server-root for caching as well. cleaning this would solve the issue. This is of course also taken care of when rebooting the server.

    Make sure your webserver has write access to the var, var/cache and var/tmp folder in your magento installation. Try using chmod -R 700 var or chmod -R 766 (use the latter with caution).

    NOTE: This is the result of not having your file/directory permissions properly set. Magento tries to use var/cache and var/tmp, finds them unwritable by the web server user and proceeds to move its cache to the system /tmp folder. No matter how much you curse and change the BaseURL settings and erase anything you find in var/cache, Magento continues to read the cached configuration out of the system /tmp folder.

    Don't believe that Linux Server Admin 101 problems cause this? Here's visual proof.

    enter image description here

    enter image description here

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

    in my case it was baseUrl with one upper-case letter

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

    I also had some problems with url redirection, be sure when you set your new domain in backend to add a / character at the end of the url. All the best!

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

    I figured out that perform the move operation using interfaces:

    1. Under admin > configuration > general tab > web, update base url and secure base url.

    2. Move your folder.

    3. Under command line tell magento to clear cache.

    php bin/magento cache:clean

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

    Delete cache from var/cache directory.

    after that run this query in core_config_data table in magento. after that you ll not get redirect error.

    This process ll work for both Magento 1.9.x and magento 2.x

    UPDATE core_config_data SET value="http://example.com/" WHERE path="web/unsecure/base_url"; UPDATE core_config_data SET value="https://example.com/" WHERE path="web/secure/base_u

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

    I just had this problem, after trying everything listed above and on several other SO answers i discovered there is more than one base_url definition in the core_config_data table

    if you run

    select * from core_config_data where path like '%base_url%'
    

    You should see all of the definitions the scope was different on this definition and was overriding the default which i had already changed.

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