【问题标题】:How to change the base_url in magento.,because my site were gone after i'm changing that on my magento admin如何更改magento中的base_url。,因为在我在magento管理员上更改之后我的网站就消失了
【发布时间】:2011-07-07 20:02:34
【问题描述】:

如何在 Magento 中更改 base_url,因为在我在 magento 管理员设置中更改了它之后,我的网站就消失了……现在我在那个 url 上收到 404 错误,管理员和前端将无法打开……

【问题讨论】:

    标签: sql url magento base-url


    【解决方案1】:

    在 mysql 中执行以下查询(通过 phpmyadmin 或命令行)以查看当前值是什么:

    select * from core_config_data where path like '%base%url%'; 
    

    然后进行相应的更新

    update core_config_data set value = 'http://myhostname/js/' where path = 'web/unsecure/base_js_url';
    

    【讨论】:

    • 然后删除var/cache/目录的内容。
    【解决方案2】:
    UPDATE `core_config_data` SET `value` = replace(`value`, 'https://www.oldname.com/', 'https://www.newname.com/') WHERE `value` LIKE '%https://www.oldname.com/%';
    

    【讨论】:

      【解决方案3】:

      第1步:mysql -u root -p回车
      第 2 步:输入您的数据库密码
      第三步:select * from core_config_data where path = 'web/unsecure/base_url';
      第 4 步:select * from core_config_data where path = 'web/secure/base_url';
      第 5 步:update core_config_data set value = 'https://domain.com/' where path = 'web/secure/base_url';
      第 6 步:update core_config_data set value = 'http://domain.com/' where path = 'web/unsecure/base_url';
      第 7 步:exit;enter
      第 8 步:清除会话和缓存
      第 9 步:/etc/init.d/mysql start
      第 10 步:sudo service apache2 restart

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-01-09
        • 1970-01-01
        • 1970-01-01
        • 2016-12-18
        • 2013-04-30
        • 1970-01-01
        相关资源
        最近更新 更多