Here is my problem: I am trying to set up a development copy of a running Magento website. I created a subdomain, copied all the files to the /dev directory, made a copy of the database, set up the new credentials in /dev/etc/local.xml, change the secure and unsecure URL in core_config_data, but when I try to access the dev page I am always redirected to the live page.

I checked the .htaccess files, I actually cleared it at one point, I disabled Auto-redirect to Base URL (both on the live and the dev version), but the page is still getting redirected.

What and where should I look to get this issue resolved.

Here is the live version of the site: www.example.com Dev version should be here: dev.example.com or www.example.com/dev

2 Answers 2


This sounds like a caching issue. Assuming you are using file cache, delete everything from dev/var/cache. If that doesn't work it could be the classic "the cache isn't where you think it is" problem. If 'dev/var/cache' isn't writable then the cache may get created in /tmp/magento/.

  • Yes, this solved the issue, thank you! At least lumeabasmelor.ro/dev is working, but dev.lumeabasmelor.ro not. Also I can't login to the admin panel, any idea what to set and where? Sorry for all the questions, but I have been blocked here since december 20th :)
    – Andras
    Commented Jan 5, 2015 at 15:40
  • To make the dev subdomain work you'll probably have to either a.) create a new VirtualHost that points directly to the dev folder, or b.) edit the .htaccess on the LIVE site to redirect to /dev/index.php if the domain is dev.lumeabasmelor.ro. Personally I'd recommend a.) if at all possible. Commented Jan 5, 2015 at 16:21
  • Option a.) is not possible, I tried option b.), dev.lumeabasmelor.ro works, but when I try to log in to dev.lumeabasmelor.ro/admin it always redirects me to www.lumeabasmelor.ro/admin and asking me to log in again.
    – Andras
    Commented Jan 5, 2015 at 20:53
  • When you go to dev.lumeabasmelor.ro/admin, you're probably actually looking at the live site. Commented Jan 5, 2015 at 21:18
  • Yeah but the same thing happens when I go to lumeabasmelor.ro/dev/index.php/admin
    – Andras
    Commented Jan 5, 2015 at 21:24

In my case cache is stored in my root tmp folder.I have delete all zend_cache* then it works.

  • This was it for me. /tmp/magento/var/cache was added automatically. I removed the cached files and immediately tried my dev URL again and it no longer redirected to the production URL. Thank you. Commented Aug 8, 2016 at 3:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.