1

I rebuilt a new server from another server's image. And I want to use it for a new domain, but I'm finding that the new server continues to redirect to the original server's domain.

Going to the new server's drupal admin console, I see that the domain (ie, https://mysite.com/) is uneditable under Configuration > System > Site Information > Front Page > Default Front Page.

I tried setting the 'base_url' in /etc/drupal/7/sites/default/settings.php to my new domain and flushed the cache, but that didn't resolve the problem (and the old domain still persists in the console).

3 Answers 3

1

Have you tried the below changes in your settings.php and .htaccess?

 /sites/default/settings.php

$base_url = 'http://www.example.com'; // NO trailing slash!

and

.htaccess

  # Modify the RewriteBase if you are using Drupal in a subdirectory and
  # RewriteBase /drupal

Try using this.

0

Have a closer look at settings.php the value may be hardcoded there

In particular: $conf['site_frontpage'] or $base_url

You may also just need to flush all caches at Admin > Config > Performance

3
  • the $base_url is set to the new domain and setting $conf['site_frontpage'] and flushing the cache didn't resolve the issue. any other suggestions? Commented Aug 13, 2014 at 23:39
  • It sounds like something else might be hardcoding the $base_url value. Have a grep/find-in-files search for base_url in your site module / theme files Commented Aug 13, 2014 at 23:47
  • did a grep on the module and didn't find anything that would be pointing to the old domain =( Commented Aug 14, 2014 at 1:25
0

This could be set in a lot of places.

You should try searching all your code for mention of the previous domain and go from there.

grep -irn "example.com" .

Where example.com is the old domain.

This will list all matches of example.com. At the beginning you'll see the files. Then the line numbers. Then the string that it matched.

Your Answer

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

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