Skip to content

Commit c6a8611

Browse files
committed
Merge pull request #2671 from infograf768/multilang25x
# Multilingual: solving 404 when Remove URL Language Code is set to YES (2.5.x)
2 parents 47d4b69 + 7c2263b commit c6a8611

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/system/languagefilter/languagefilter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public function parseRule(&$router, &$uri)
246246
// redirect if sef does not exists and language is not the default one
247247
if (!isset(self::$sefs[$sef]) && $lang_code != self::$default_lang)
248248
{
249-
$sef = isset(self::$lang_codes[$lang_code]) ? self::$lang_codes[$lang_code]->sef : self::$default_sef;
249+
$sef = isset(self::$lang_codes[$lang_code]) && empty($path) ? self::$lang_codes[$lang_code]->sef : self::$default_sef;
250250
$uri->setPath($sef . '/' . $path);
251251

252252
if ($app->getCfg('sef_rewrite')) {

0 commit comments

Comments
 (0)