【问题标题】:Magento 2.0.2 is automatically redirecting to localhost on live serverMagento 2.0.2 自动重定向到实时服务器上的本地主机
【发布时间】:2016-02-07 06:59:30
【问题描述】:

谁能帮帮我?

在将 magento 2.0.2 文件上传到实时服务器并将数据库导入 PHPMYAdmin 后,现在索引会自动重定向到已传输文件的本地主机。我知道它需要更改 URL 路径但没有找到正确的位置,在 magento 1.9 中更改数据库表(core_config_data 表)中的路径,但如何更改 magento 2.0.2 中的正确路径?

您的帮助将不胜感激 :) 谢谢

【问题讨论】:

  • 至少找到了,重定向已经解决了。

标签: magento2 magento-2.0


【解决方案1】:

我知道你修好了,但这里是我的解决方案,也许它可以帮助其他人:
当您从本地转到现场时,您会切换您的域并需要告诉 Magento。一个简单的方法是在 CLI 上:

# http:// or https://, and a trailing slash /.
./bin/magento setup:store-config:set --base-url="http://your-domain.com/"
./bin/magento setup:store-config:set --base-url-secure="https://your-domain.com/"

# clear cache
./bin/magento cache:flush

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-31
    • 1970-01-01
    • 2016-02-02
    • 1970-01-01
    相关资源
    最近更新 更多