Fix 404 error when document_srl is the only part of the URL

This commit is contained in:
Kijin Sung 2020-06-18 10:38:36 +09:00
parent 221f30484f
commit c7949e11db

View file

@ -11,6 +11,11 @@ class Router
* List of XE-compatible global routes.
*/
protected static $_global_routes = array(
'$document_srl' => array(
'regexp' => '#^(?<document_srl>[0-9]+)$#',
'vars' => ['document_srl' => 'int'],
'priority' => 0,
),
'$mid' => array(
'regexp' => '#^(?<mid>[a-zA-Z0-9_-]+)/?$#',
'vars' => ['mid' => 'any'],
@ -21,11 +26,6 @@ class Router
'vars' => ['act' => 'word'],
'priority' => 0,
),
'$document_srl' => array(
'regexp' => '#^(?<document_srl>[0-9]+)$#',
'vars' => ['document_srl' => 'int'],
'priority' => 0,
),
'$mid/$document_srl' => array(
'regexp' => '#^(?<mid>[a-zA-Z0-9_-]+)/(?<document_srl>[0-9]+)$#',
'vars' => ['mid' => 'any', 'document_srl' => 'int'],