Patch attached. A module should use the function hook_domain_user_default_redirect_path_alter(&$path) to modify the redirect path.

Example for use with the path redirect module:

/**
 * Implements hook_domain_user_default_redirect_path().
 */
function my_module_domain_user_default_redirect_path_alter(&$redirect_path = '') {
  // Only alter the redirect path if it's empty.
  if (!$redirect_path) {
    if (module_exists('path_redirect')) {
      module_load_include('module', 'path_redirect');
      $path = $_GET['q'];
      global $language;
      // Check whether a redirect exists for this path.
      if ($redirect = path_redirect_load_by_source($path, $language->language, '')) {
            path_redirect_goto($redirect['rid']);
      }
    }
  }
}

Comments

jhedstrom’s picture

Status: Needs review » Fixed

This looks good. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.