From b650be47fdbf3134e0340441bc9e01229cbe83d3 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Wed, 16 Oct 2019 17:09:40 +0900 Subject: [PATCH] Update uri.php --- system/uri.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/system/uri.php b/system/uri.php index fb314ee..c3c6783 100644 --- a/system/uri.php +++ b/system/uri.php @@ -41,7 +41,21 @@ if(!check_function_exists("read_route")) { // get requested route $route = get_requested_value("route"); - // if empty route + // if empty route: URI Route + if(empty($route)) { + if(loadHelper("networktool")) { + $nevt = get_network_event(); + $d0 = explode(str_replace("index.php", "", $nevt['self']), $requests['_URI']); + $s0 = end($d0); + $d1 = explode("/", $s0); + $s1 = current($d1); + if(!empty($s1)) { + $route = $s1; + } + } + } + + // if empty route: default route if(empty($route)) { $route = get_value_in_array("default_route", $config, "welcome"); }