diff --git a/core/modules/language/language.negotiation.inc b/core/modules/language/language.negotiation.inc index 2182f4d..92c6284 100644 --- a/core/modules/language/language.negotiation.inc +++ b/core/modules/language/language.negotiation.inc @@ -462,9 +462,10 @@ function language_url_rewrite_url(&$path, &$options) { } // Ask for an absolute URL with our modified base URL. + // We also add Drupal's subfolder from the base_path if there is one. $url_scheme = Drupal::request()->isSecure() ? 'https://' : 'http://'; $options['absolute'] = TRUE; - $options['base_url'] = $url_scheme . $domains[$options['language']->langcode]; + $options['base_url'] = $url_scheme . $domains[$options['language']->langcode] . rtrim(base_path(), '/'); // In case either the original base URL or the HTTP host contains a // port, retain it.