We are having the strangest Redirection problem on a Magento site. We copied the sites contents from another Magento site to a new URL. We have done this in the past with no problems but for some reason this one redirects to the old website as soon as you try to load the page, any page.
Below are all the steps I have done so far in my quest to Debug this pain…
www.Old-Domain.com = The Old site URL that we moved away from
www.NEW-Domain.com = The new site that we have copied Magento over to.
Steps done so far to try an resolve redirection issue:
- Searched whole MySQL database (All tables) for the string
www.Old-Domain.com
and made sure there was none that could be causing the Redirection to happen. - Updated Database Table
core_config_data
columnsweb/unsecure/base_url
andweb/secure/base_url
to the new sites URLwww.NEW-Domain.com
- cleared any Cache files from
/var/cache/
in the Magento Root - Checked Server's cache folders to make sure files weren't being cached there due to permission or other error.
- Inspected
.htaccess
file to make sure it wasn't happening there - Inspected
index.php
file as well and printed out some content followed by anexit()
call and progressively moved it down the page until the point that the Redirection occurs. It is the very last line where this is calledMage::run($mageRunCode, $mageRunType);
once the page loads and gets to this line, I am immediately Redirected to our old website URL!
Any ideas?
Best Answer
Or the oldest one in the book, your file/directory permissions are out of whack causing Magento to write to the system
/tmp
folder which means config information is cached till you reboot the whole server or go delete the Magento cache out of the system/tmp
folder.Issue is described here Can't change Magento base URL, stuck in cache
Only including this because the server's cache folders doesn't necessarily translate into /tmp
Also, it isn't noted if this is a different domain on the same server, but
local.xml
needs a change of database credentials in addition to not naming the backup copy oflocal.xml
something likebackup-local.xml
which would load it previous to your changed file (Magento loads all.xml
files inapp/etc
)Also, if this was a direct copy of all files, and the compiler was enabled, disable it and clear its code store.