Magento base_url无法正常工作

时间:2012-10-19 17:15:30

标签: magento

我将生产的Magento应用程序复制到我的开发机器上。我更改了core_config_data表中的base_url(2行)。我在magento安装目录中删除了/ var / cache / *。

但是当我访问www.my_dev.com/shop时,它会将我重定向到www.my_production.com/shop。

这是core_config_data(我修改了伪造的URL):

mysql> select * from core_config_data;
+-----------+---------+----------+-------------------------------+------------------------------------------------------+
| config_id | scope   | scope_id | path                          | value                                                |
+-----------+---------+----------+-------------------------------+------------------------------------------------------+
|         1 | default |        0 | general/region/display_all    | 1                                                    |
|         2 | default |        0 | general/region/state_required | AT,CA,CH,DE,EE,ES,FI,FR,LT,LV,RO,US                  |
|         3 | default |        0 | catalog/category/root_id      | 2                                                    |
|         4 | default |        0 | admin/dashboard/enable_charts | 1                                                    |
|         5 | default |        0 | web/unsecure/base_url         | http://www.my_dev.com/shop/ |
|         6 | default |        0 | web/secure/base_url           | http://www.my_dev.com/shop/ |
|         7 | default |        0 | general/locale/code           | en_US                                                |
|         8 | default |        0 | general/locale/timezone       | America/Los_Angeles                                  |
|         9 | default |        0 | currency/options/base         | USD                                                  |
|        10 | default |        0 | currency/options/default      | USD                                                  |
|        11 | default |        0 | currency/options/allow        | USD                                                  |
+-----------+---------+----------+-------------------------------+------------------------------------------------------+
11 rows in set (0.00 sec)

我错过了什么?

感谢。

Sam Kong

2 个答案:

答案 0 :(得分:0)

  1. 转到数据库,检查core_config_data表。确保web/unsecure/base_urlweb/secure/base_url设置为http://www.my_dev.com/shophttps://www.my_dev.com/shop(后者也可以使用http而不是https)
  2. 检查Cookie域是否设置为正确的域或保留为空
  3. 检查.htaccess是否有一些自定义重写(基本上你必须在那里搜索www.my_production.com/shop字符串并将其替换为你的生产URL)。
  4. 如果有任何帮助,请告诉我。如果没有,我们将搜索另一种解决方案。

答案 1 :(得分:0)

如果您像往常一样复制了数据库,则应该在app / etc / local.xml中更改数据库,其中域名安全且不安全,是www.my_dev.com/shop 这是我在匆忙中做的常见错误, 再见 恩里科

相关问题