How to handle Dev and Production servers having different file structure I know you are not supposed to do this, but for reasons beyond my control the location of my web root is different on my Dev and my production server.  As a result everytime I copy the database from my production server to my Dev server, all of my modules become confused and point to the wrong file location. What is the recommended way to handle this?
If you are using Drush you can run the following commands to fix the module path problem, if you are using multisites then make sure you are in the sites/mysite.com directory (this must not be a symlink) before running these commands.

Drupal 6

drush eval "module_rebuild_cache();"
drush cc all


Drupal 7

drush eval "system_rebuild_module_data();"
drush cc all


(though as I've not tested I'm not sure this is needed on Drupal 7 anymore)

If Drush is new to you then here is the description from the Drush project page:


  Drush is a command line shell and
  scripting interface for Drupal, a
  veritable Swiss Army knife designed to
  make life easier for those of us who
  spend some of our working hours
  hacking away at the command prompt.