set_exception_handler() works 2 times with mod_rewrite
I have the next simple logging code:
function log($exception) {
error_log($exception->getMessage() . "\n", 3, 'error.log');
}
set_exception_handler('log');
throw new Exception('Holy cow!');
And I need to make all requests go to index.php. So my .htaccess file is next:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
And for this situation I have 2 records in log file. But when I remove Rewrite conditions, just 1 record i开发者_StackOverflow社区nserts.
How can I avoid of inserting 2 same records? Sorry for my english.Try to put a favicon.ico in your web root.
精彩评论