PHP's built in web server allows "router scripts" to be used, allowing for rewriting URLs internally.
The problem with such a router script is the fact that whenever it actually handles a file instead of letting PHP handle it, this causes the request log output for that request to be suppressed. For example, consider the following script:
<?php
if (preg_match('/^\/(js|css)/', $_SERVER['REQUEST_URI']) === 1) {
return false;
}
else {
echo 'hello world!'
}
This causes requests for /js/*
and /css/*
to be logged on the console; whereas requests for any other URLs simply skip logging the request.
How can I enable logging of all requests to the console?