0
votes

I hope you can help get to the bottom of this. This is whats happened:

  • We duplicated our live Magento site (for example we'll call it domain1.com) to a development server (for this example I'll call this domain2.com)
  • Did a find/replace for the domain1.com to domain2.com in both the database and files
  • Deleted all var/cache and var/session files
  • Reindexed all indexes via SSH
  • Emptied browser cache
  • Checked all file permissions
  • Disabled the .htaccess incase this was causing a redirect

But it's still redirecting to the live server (domain1.com)??

Any ideas what may be triggering this?

Cheers,

Dave

3
My guesses would be, that you either missed a %base_url% value in table core_config_data, or your app/etc/local.xml still points to the live database.Jürgen Thelen

3 Answers

0
votes

Solved the issue...hopefully this helps some other people.

When the site was duplicated we edited the "local.xml" file with the new details but kept the old one and renamed it "localnew.xml"

It seems Magento was still picking up these details as so was redirecting to the old site.

Deleting the "localnew.xml" (or whatever you called it eg. localxxx.xml) fixed all our issues!

0
votes

I'm working in a local Centos 6.4 running in a VM at the moment to test various things.

My production Magento site is in that folder: /var/www/html/magento and the staging site is there: /var/www/html/staging/magento

I had the same issue than you, did everything I could come up with, triple checked the urls in the database, cleared the cache, checked the .htaccess file, rebooted multiple times.

The one thing that fixed the issue has been to set back the permissions properly:

cd /var/www/html/staging/magento
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chown -R sysadmin:apache .
chmod -R 777 media app/etc var var/.htaccess
-2
votes

Just open your DB and open the table "core_config_data"

then edit the values for the path web/secure/base_url & web/unsecure/base_url