Преглед на файлове

fix the subpages url resolution on dev mode

Olivier Massot преди 4 години
родител
ревизия
8b76eea02d
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      ot_core/Classes/Website/OtWebsiteRepository.php

+ 1 - 2
ot_core/Classes/Website/OtWebsiteRepository.php

@@ -349,8 +349,7 @@ class OtWebsiteRepository
 
         $tail = $uri->getPath();
         if ($devMode) {
-            $tail = rtrim($tail, '/') . '/';
-            $tail = preg_replace("/\/?[\w\-]+\/(.*)/", "/$1", $tail);
+            $tail = preg_replace("/\/?[\w\-]+\/?(.*)/", "/$1", $tail);
         }
 
         $q = $this->connectionPool->getQueryBuilderForTable('pages');