How to correct domain in URLs after a change?
I would double check the civicrm.settings.php file to make sure the paths and URL are updated in there. For example:

define( 'CIVICRM_UF_BASEURL'      , 'http://foo.example.com/' );


While you are in there make sure the server paths look right:

$civicrm_root = '/home/path_to_html/sites/all/modules/civicrm';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/home/path_to_html/sites/default/files/civicrm/templates_c/' );