diff --git a/includes/locale.inc b/includes/locale.inc index 7fb8d64..6a964e6 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -443,6 +443,16 @@ function locale_language_url_rewrite_url(&$path, &$options) { // Apply the appropriate protocol to the URL. $options['base_url'] = $url_scheme . $host; + + // Let's check the $base_url and add it to the path if it exists. + global $base_url; + if (isset($base_url)) { + $base_path = parse_url($base_url, PHP_URL_PATH); + if ($base_path) { + $options['base_url'] .= $base_path; + } + } + if (isset($options['https']) && variable_get('https', FALSE)) { if ($options['https'] === TRUE) { $options['base_url'] = str_replace('http://', 'https://', $options['base_url']);