diff --git a/source/Core/SeoDecoder.php b/source/Core/SeoDecoder.php index 4571f98d66..2354be9e91 100644 --- a/source/Core/SeoDecoder.php +++ b/source/Core/SeoDecoder.php @@ -61,9 +61,14 @@ public function decodeUrl($seoUrl) { $stringObject = Str::getStr(); $baseUrl = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopURL(); + $basePath = parse_url($baseUrl, PHP_URL_PATH); + if ($stringObject->strpos($seoUrl, $baseUrl) === 0) { $seoUrl = $stringObject->substr($seoUrl, $stringObject->strlen($baseUrl)); + } elseif ($stringObject->strpos($seoUrl, $basePath) === 0) { + $seoUrl = $stringObject->substr($seoUrl, $stringObject->strlen($basePath)); } + $seoUrl = rawurldecode($seoUrl); //extract page number from seo url