diff --git a/languagelink/services/LanguageLinkService.php b/languagelink/services/LanguageLinkService.php index ca3e23e..a381699 100644 --- a/languagelink/services/LanguageLinkService.php +++ b/languagelink/services/LanguageLinkService.php @@ -80,6 +80,11 @@ private function _parseUrl($url, $localeCode) // Homepage doesn't need trailing slash if ($url != '') { + // make sure baseUrl has trailing slash + $baseUrl = rtrim($baseUrl, '/') . '/'; + // make sure url has no starting slash + $url = ltrim($url, '/'); + $url = $url.$trailing; }