I am in the process of moving a Drupal site to a new server. I copied the database and moved all the files.

The old URL for the site is http://www.sniffingmusicians.echidna-band.com/ and the new is http://www.sniffingmusicians.com/, which point to a different server.

Even though the frontpage of new is there, when I log in, I am redirected to the old domain.

Additionally, all the content is using the old URL. I changed the value of $base_url in settings.php, but there is no real impact.

Where else can I reconfigure my site's URL?

  • 2
    Have you flushed your cache after changing the base_url? Have you modified your .htaccess file from what came with core?
    – schnippy
    Aug 24, 2013 at 20:53
  • No to both. Access the clear cache page. I'll check on .htaccess Aug 25, 2013 at 8:49
  • Enabled rewriteon on .htacess but I still can only access the main page. For example it says that admin/modules does not exist. Aug 25, 2013 at 9:12
  • ok, one at a time: 1. Clear cache and check if you have any reference of URL in DB 2. Make sure clean-urls has been enabled. Until then visit the pages with '?q=' e.g. sniffingmusicians.com?q=user/login
    – vijaycs85
    Dec 22, 2014 at 13:23

4 Answers 4


I came up with the same error after did a server migration.

After all those try error, I just realised I didn't give apache permission to access the web folder. After added in apache config, everything works as charm


Maybe you can use this module:

Path Redirect (Drupal 6)

Redirect (Drupal 7)


Just in case someone else comes across this issue.

1) Check that the base URL is set or uncomment it in the settings.php around line 247. Mine was set to the old URL and did a www redirect.

2) Check your .htaccess file in case there are some hard coded redirects. Look for the full URL.

3) As mentioned before in the accepted answer, check permissions are correct. Some really good help here: https://www.drupal.org/node/244924

4) If you have the global redirect module enabled turn it off.

drush pm-disable globalredirect
drush cc all

or use SQL and truncate the cache tables manually:

UPDATE system SET status=0 where name='globalredirect';

5) Apparently mobile tools can also cause the redirect. https://www.drupal.org/node/1713462#comment-6312804

drush pm-disable mobile_tools
drush cc all

Or with SQL

UPDATE system SET status=0 where name='mobile_detect';

6) Secure pages can also cause the redirect. This is what it was in my case. You can set the base path variable to your new domain using either drush:

drush vset securepages_basepath 'http://example.com'
drush vset securepages_basepath_ssl 'http://example.com'
drush cc all

Or disable secure pages entirely via drush:

drush pm-disable securepages

And here via SQL and truncate the "cache_*" tables yourself:

UPDATE system SET status=0 where name='securepages';

If you are using domain access, be sure to check the table PREFIX_languages. I had the exact same problem and wasted 2 days before I found the problem. The old domain was hard coded in the PREFIX_languages table and once I changed it everything worked perfectly.

  • There is no indication that the OP is using Domain.
    – mpdonadio
    May 16, 2014 at 22:10
  • @MPD, please notice the word 'if'. I responded to 'Drupal redirects to old url after moving to new server', a problem I have faced several times and solved the hard way. There is no reason to down-vote a sincere answer. Dec 14, 2014 at 6:59

Your Answer

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

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