116d115
<     $path = $_REQUEST['q'];
119a119
>       $path = $_REQUEST['q'];
122c122,123
<     $prefix = _globalredirect_prefix($path, $options);
---
>     $prefix = rtrim($options['prefix'], '/');
> 
182c183
<         drupal_goto($prefix . $alias, $query_string, NULL, 301);
---
>         drupal_goto($alias, $query_string, NULL, 301);
197,218d197
< function _globalredirect_prefix($path, $options) {
<   $prefix = rtrim($options['prefix'], '/');
< 
<   // Check if site is configured for "Path prefix only"
<   // (may also be necessary for path prefix with language fallback - but that is untested)
<   if (variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE)) {
<     if (preg_match("@^node/(\d*)$@", $path, $regs)) {
< 	    $n = node_load($regs[1]);
< 	    // Check the node language
< 	    $language_code = ($n->language) ? $n->language : '';
< 	    // Get the prefix for the language
< 	    $languages = language_list();
< 	    if ($languages[$language_code]->enabled) {
<         $prefix = $languages[$language_code]->prefix;
<         $options['language']->language = $language_code;
< 	    }
<     }
<   }
<   return $prefix;
< }
< 
< 
