Update uri.php

This commit is contained in:
Namhyeon Go 2019-02-22 23:46:13 +09:00 committed by GitHub
parent 3b8ae917b2
commit 54ed2820f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,15 @@ if(!function_exists("read_route")) {
// if empty route
if(empty($route)) {
$route = get_value_in_array("default_route", $config, "welcome");
$request_uri = $_SERVER['REQUEST_URI'];
$d = explode("/index.php/", $request_uri);
if(count($d) > 1 && $d[0] == "") {
$route = $d[1];
}
if(empty($route)) {
$route = get_value_in_array("default_route", $config, "welcome");
}
}
return $route;