I have moved a copy of my production site to a development box. When I clear cache at admin/settings/performance or save settings on a theme, all of a sudden the URL jumps from localhost/example/admin/build/themes/settings/theme to www.example.com/admin/build/themes/settings/theme for instance. I have cleared all of my cache tables manually via phpmyadmin and for the browser (chrome, cleared everything "from the beginning of time"). I can't successfully run cron .

EDIT: If I had enough reputation, I would downvote myself. I had the "base url" setting enabled in settings.php.

  • Random guess...secure pages installed and an https RedirectRule in the .htaccess? – Clive Mar 13 '14 at 19:21
  • I'm not very familiar with all the Drupal configs, so I'd do a search of example.com in the database dump file and in the source code of the enclosing project in this situation. Times when Ctrl+H in Eclipse comes in handy. – Randell Mar 13 '14 at 22:52
  • Based on your edit, I think you should answer your own question. That way, it will not show up as unanswered. I am not sure whether you are allowed to accept your own answer ... – benjifisher Mar 14 '14 at 3:19
  • 1
    Hah, I was going to suggest your answer before I got to it - I have done that more than once! Also, yes, answer your own question and after a while you can mark it as correct. – Brandon Bearden Mar 14 '14 at 3:24

@Clive's suggestion jarred my memory and I figured it out. I have a multisite setup that I was migrating and had the base url setting in settings.php set to www.example.com and I had forgotten to change it to the localhost url. When I commented out the base url setting, everything was fine.

| improve this answer | |

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