From c7949e11db0bb53fd011c9d485fd75fa26c8e4ab Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 18 Jun 2020 10:38:36 +0900 Subject: [PATCH] Fix 404 error when document_srl is the only part of the URL --- common/framework/router.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/framework/router.php b/common/framework/router.php index fb977fd74..cab7cff5a 100644 --- a/common/framework/router.php +++ b/common/framework/router.php @@ -11,6 +11,11 @@ class Router * List of XE-compatible global routes. */ protected static $_global_routes = array( + '$document_srl' => array( + 'regexp' => '#^(?[0-9]+)$#', + 'vars' => ['document_srl' => 'int'], + 'priority' => 0, + ), '$mid' => array( 'regexp' => '#^(?[a-zA-Z0-9_-]+)/?$#', 'vars' => ['mid' => 'any'], @@ -21,11 +26,6 @@ class Router 'vars' => ['act' => 'word'], 'priority' => 0, ), - '$document_srl' => array( - 'regexp' => '#^(?[0-9]+)$#', - 'vars' => ['document_srl' => 'int'], - 'priority' => 0, - ), '$mid/$document_srl' => array( 'regexp' => '#^(?[a-zA-Z0-9_-]+)/(?[0-9]+)$#', 'vars' => ['mid' => 'any', 'document_srl' => 'int'],