mac
mac

Reputation: 858

Drupal IP/domain redirect

I recently redid a client's old Drupal site, in Apostrophe, and pointed their domain to the new server.

I am now trying to access the old site via IP address, but there seems to be a redirect configured to rewrite the base IP address to the domain name (72.xx.xxx.xxx to www.clientdomain.com).

Is there something configured in Drupal to rewrite the IP address? Can I change a field in the database or configuration files to prevent this?

I have ssh access to the server, and have poured over the Drupal code, settings.php, .htaccess, etc., but cannot locate this offending field. I am not familiar with Drupal, but suspect it could be an admin setting. Since the site redirects, I am unable to login to the admin backend.

Any and all insight is appreciated. Thanks for your help!

Upvotes: 0

Views: 815

Answers (1)

AKS
AKS

Reputation: 4658

A few possibilities:

  • In the settings.php (sites/default/settings.php), see if there is a $base_url set. If you can see any, comment that line. You can run a drupal site without the base_url hardcoded in the settings.php

  • In the .htaccess look for redirects. Your safest bet is to replace it with a fresh file downloaded from http://drupal.org/project/drupal

The most likely case is that your web server is configured to redirect the IP address to the main domain.

You can also access your site at old server by explicitly setting the IP address in your hosts file. Check it for your operating system DNS resolver docs.

Upvotes: 1

Related Questions