4

Edit: solved

I moved my magento-installation to a new domain, copied the database, changed the app/etc/local.xml to show to new database, changed the web/unsecure/base_url and web/secure/base_url and cleared the var/cache directory. The shop itself works with the new domain. But when I want to access the admin panel I get redirect to old url.

I also checked for system -> config -> admin -> admin BaseURL if there is any user specific settings. -> Its not.

I also checked in htaccess for any redirects. -> none.

What else could cause this redirect? I am out of ideas.

  • Did you update the app/etc/local.xml to point to the new domain's database? – Michael Jun 18 '15 at 13:17
  • @kaska yes I did (forgot to mention that) – nbar Jun 18 '15 at 13:19
  • 2
    please delete all filers from you magentodir/var/cache – Amit Bera Jun 18 '15 at 13:41
  • @AmitBera I cleared the hole var/cache folder – nbar Jun 18 '15 at 13:43
  • @AmitBera I did it again and now it works. I am not sure what went wrong there and what the answer to my question is now. But thanks for encourage me do it again! – nbar Jun 18 '15 at 13:48
6

As my comment solved your problem I will post it as an answer.

According to magento takes all config data from cache folder you have to clear the magentodir/var/cache - including all subfolders - to be sure the new config is taken.

You said you allready cleared the cache, my advice is to check this point again. (Maybe you cleared the cache before you did the necessary changes?)

4

Check your core_config_data table with following filter

scope => stores
scope_id => 0
path => web/unsecure/base_url

scope => stores
scope_id => 0
path => web/secure/base_url

if the value is http://olddomain.com then change it new domain or delete the record.

  • I have only scope => default scope_id => 0 for both entries – nbar Jun 18 '15 at 13:22
  • And this are set to newdomain – nbar Jun 18 '15 at 13:29
1

I believe the problem come from the URL index cache. Let's do these steps to make sure you can fix it.

  • Login to Phpmyadmin or any database method to empty the table core_url_rewrite (remember back up it first to make sure you have no risk).
  • Make sure you clear all browser cache or use another browser and login to admin of magento. Now you will see it won't redirect to old domain any more.

Hope it 's useful

  • Good points. I actually did this (I did not empty the core_url_rewrite, but searched it for any URL that could cause the problem. I also checked it with Incognito mode to be sure I don't have any cookies. I upvote cause if someone else got the problems I think this points are good hints. – nbar Jun 18 '15 at 16:03
  • For the best, I think you should use another browser to make sure you have no cache. Browser like chrome have some crazy behavior for cache – Phuc Jun 19 '15 at 1:00
  • You shouldn't suggest to clear the core_url_rewrite table. That's a darn useful table that stores all the rewrites that magento has setup along with user created as well. You could wipe out years of work with this and can never be a solution. – VeeK Nov 17 '16 at 10:13
0

As someone mentioned above, check the core_config_data table, but instead query the value field. You could have created a new record with a different scope.

I ran this query SELECT * FROM 'core_config_data' WHERE 'value' LIKE '%http%' and spotted a 2nd copy of web/unsecure/base_url under a different storefront.

0

The solution to this for me was to flush the Redis cache. A similar solution probably applies if using Memcached.

0

After all of that still you have problem Try

sudo reboot

ftom putty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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