In the midst of moving all my Drupal files from one directory to another, my FTP client crashed. I thought I restored all my files in the original directory location but something went wrong.

I can load the front page fine but when I click on link, I get:

"The requested URL /index.php was not found on this server."

index.php is there since I can load the front page but I suppose all of the links are looking for it somewhere else. I looked at my .htaccess file and all references to index.php are at the root folder (ie. no subdirectory specified). Is this correct or is this the "root" of my problem (pun intended).

As a follow-up, when moving a Drupal installation from one directory to another, what do I need to know to make the site properly in the new location?

Comments

alan d.’s picture

Is your rewrite directory updated in your .htaccess? It should never be set, (unless you really need to), but check the $base_url in the settings.php file.

Also, run update.php (partial cache flush) - flush all of your caches if possible, this fixes most issues with moving sites


Alan Davison
hhkont’s picture

The Rewritebase line in .htaccess was commented out. I uncommented it and changed it to the subdirectory that houses my Drupal files.

I then tried update.php and was able to run that.

The site still doesn't work but now, instead of the plain 404 error page, I get a "Page Not Found" error but formatted with the css elements of my site.

I think the problem is related to clean URLs. I'd like to be able manually enter in the non-clean URLs but don't know the syntax to use. I'm sure it's documented here on the forum but the search function is hard to use. Too many results returned. Is there a document that helps me enter manual URLs? (non-clean)?

alan d.’s picture

index.php?q=user

or just

?q=user

In your theme, add the following to turn this feature off (run the page once, then remove the code)

variable_set('clean_url', 0);

or navigate to ?q=admin/settings/clean-urls to see if the form works to turn it off via the interface


Alan Davison