"site", "controller" => "home", "action" => "index"); Dispatcher::dispatch($request); exit; } // ANY SHARED CONTROLLERS HERE UNDER THE 'SHARED' APPLICATION if ($parts[0] == 'projects') { if ($parts[1]) { $request = array('application' => 'site', 'controller' => 'projects', 'action' => 'show_project'); $_REQUEST['slug'] = $parts[1]; } else { $request = array('application' => 'site', 'controller' => 'projects', 'action' => 'index'); } } elseif ($parts[0] == 'quote') { if ($parts[1]) { $request = array('application' => 'site', 'controller' => 'quote', 'action' => 'index'); $_REQUEST['quote_type'] = $parts[1]; } else { $request = array('application' => 'site', 'controller' => 'quote', 'action' => 'index'); } } elseif ($parts[0] == '404') { $request = array('application' => 'site', 'controller' => 'error', 'action' => 'index'); } elseif ($parts[0] == 'site') { $url = '/' . $parts[1] . ($parts[2] ? $parts[2] : '') . ($parts[3] ? $parts[3] : '') . ($uri[1] ? '?' . $uri[1] : ''); header("HTTP/1.1 301 Moved Permanently"); header("Location: $url"); } else { if ($parts[1]) { $request = array("application" => "site", "controller" => $parts[0], "action" => $parts[1]); } else { $request = array("application" => "site", "controller" => $parts[0]); } } Dispatcher::dispatch($request);