0
votes

I have duplicated Drupal files and database in order to not work on production website.

I have changed the database name in the settings.php of the new drupal.

However when I login with the new Drupal, I always land on the old Drupal. Also when I click on any link in the old destination the url changes to the old one.

It is strange because when I add a new node to the old copy, it appears in the new copy. If

The new database doesn't contain it, so I guess the new copy is reading the old database.

But if I delete the new database, the new copy says "Site offline: technical issue", so the new drupal is actually pointing to the new database...

Update: Is it maybe apache domain issue ? The new path is shown as old path ?.. I dunno what to do

4

4 Answers

2
votes

Couple of options to try debugging this (I assume of course you are running Drupal 6.x):

  1. Have you tried flushing the Drupal cache?
  2. Have you tried clearing all cookies from your browser?
  3. Do you have a base_url defined in settings.php?

Next questions (update):

  1. How are you configuring drupal and apache here? Are you running seperate virtual hosts so the sites are completely independant (i.e. seperate code base, seperate DB, seperate apache virtual host)?
  2. Have you modified in anyway the .htacess file for you drupal install?
  3. Have you configured apache correctly?
1
votes

So, in the end of the day, I've finally found out why. It was the .htaccess file

I needed to update this line:

RewriteBase /oldwebsite

to

RewriteBase /newwebsite
0
votes

It could be domain module, which has its own base_url redirecting logic.

0
votes

One possibility is the 'Secure Pages' module, if you have that installed (if you have any ecommerce modules you may have installed it) it could be redirecting your admin pages to https at the production site url.

If that's the case you can turn it off in the DB with the instructions here: http://drupal.org/node/157632 and should be able to get to your local site.