Open bcole808 opened 9 years ago
if (file_exists($filePath) && is_file($filePath)) {
return false; // serve the requested resource as-is.
} elseif ($userRouter) {
return $userRouter;
}
the reason why router is not used is because the requested resource is exists
Yes, I understand that is why the router is only used for some requests. My issue is that I need all requests to go to the router, even if the resource exists in the document root directory.
The Problem
I needed to be able to have all server requests to the php built in server utilize my custom router.php file. This extension has a built in router which sometimes sends requests straight to the servers document root and sometimes sends requests to the specified router.php file.
The Fix
I added an option to allow the developer to configure this extension to always send requests to the specified router file, regardless of the contents of document root.
Works like this: