Simplify routing
This commit is contained in:
parent
4be2e0ee57
commit
b4d5ed60ee
@ -232,13 +232,9 @@ function controller_methods($controller)
|
||||
function route()
|
||||
{
|
||||
// Get the equivalent to path info
|
||||
$pi = (isset($_SERVER['PATH_INFO'])) ? str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['REQUEST_URI']) : NULL;
|
||||
|
||||
// Handle default case, without index.php
|
||||
if(empty($_SERVER['PATH_INFO']))
|
||||
{
|
||||
$pi = '/';
|
||||
}
|
||||
$pi = (isset($_SERVER['PATH_INFO']))
|
||||
? str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['REQUEST_URI'])
|
||||
: '/';
|
||||
|
||||
// Load the routes config file
|
||||
$routes = require_once(MM_APP_PATH.'config/routes.php');
|
||||
|
Loading…
Reference in New Issue
Block a user