1
votes

I copied the production Magento application to my development machine. I changed the base_url in core_config_data table (2 rows). And I removed /var/cache/* in magento installation directory.

But when I go to www.my_dev.com/shop, it redirects me to www.my_production.com/shop.

Here's the core_config_data (I modified the URL to fake ones):

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)

What did I miss?

Thanks.

Sam Kong

2
ping www.my_dev.com/shop - what is the output? does your dev machine ip respond?FlorinelChis

2 Answers

0
votes
  1. Go to the database, check for core_config_data table. Ensure that web/unsecure/base_url and web/secure/base_url are set to http://www.my_dev.com/shop and https://www.my_dev.com/shop (you can also use http instead of https for the latter)
  2. Check if the cookie domain is set to the right domain or left empty
  3. Check .htaccess for some custom rewrites (basically you have to search for the www.my_production.com/shop string there and replace it with your production URL).

Let me know if any of this helps. If not, we will search for another solution.

0
votes

If you duplicated the database, as I do always, you should change the database in app/etc/local.xml with the development one where the domain, secure and unsecure, is www.my_dev.com/shop This my common error when I do it in rush, bye Enrico