2)){ $routerRequest["page_name"] = basename($request_uri[2]); } if(count($request_uri) > 1){ $routerRequest["site_name"] = basename($request_uri[1]); } if($_SERVER["REQUEST_METHOD"] == "POST"){ $routerRequest["type"] = "api"; } if(empty($routerRequest["type"])) { $routerRequest["type"] = "page"; } return $routerRequest; }