Magento – Magento Dev site urls redirecting to live site

magento-1.7

My Magento dev site has been set up and the homepage is working for it, however all the urls around the site including the backend admin are redirecting the the live site.

I have created a new database for the dev site
I have changed the relevate base URLS in the core_config_data to match the dev site.
I have changed the local.xml to reference the dev database
I have eptied the var/cache, var/sessions and var/tmp
I have commented out/deleted the re-directs in the .htaccess files

Have I missed anything because I can not find a way to get this problem solved. Any help would be amazing. Thank you in advance.

Best Answer

We had the problem, that APC was used for caching and the prefix was the same, so the same cache was used.

Beside of this, be sure, that you changed ALL the urls in core_config_data

To configure APC you add this to your local.xml:

<global>
    <cache>
        <backend>apc</backend>
        <slow_backend>database</slow_backend>
       <prefix>prefix</prefix>
    </cache>
</global>

Be sure, that the prefix is NOT the same on your live and dev machine.

Beside of this, think about moving your dev environment to another machine, because if you kill your dev system, this might affect the live system. No good ground for experiments!

Related Topic