$_SERVER['REQUEST_URI'] = str_replace('.php', '', strtolower($_SERVER['REQUEST_URI']));
if(strstr($_SERVER['REQUEST_URI'], '?')):
define ('URI', explode('?', $_SERVER['REQUEST_URI'])[0]);
else:
define ('URI', $_SERVER['REQUEST_URI']);
endif; Localhost help me private server