[英]Preventing 404 Page Not Found: Faviconico/index in CodeIgniter
I have a CodeIgniter 3 application with log_threshold
of 1. Most of the logs I get are 404 Page Not Found: Faviconico/index
. 我有一个CodeIgniter 3应用程序,
log_threshold
为1。我得到的大多数日志都是404 Page Not Found: Faviconico/index
。 I want to receive 404s in my logs, but not this one as it's not particularly useful or informative. 我想在我的日志中收到404,但不是这个,因为它不是特别有用或信息丰富。 I've created the following routes.
我创建了以下路线。
$route['Faviconico'] = 'general/empty_response';
$route['Faviconico/index'] = 'general/empty_response';
This is the general controller method empty_response
. 这是常规控制器方法
empty_response
。
// Serves nothing
public function empty_response()
{
return false;
}
Visiting http://example.com/Faviconico/index
directly in the browser no longer cause the log where as it use to, but somehow users are still causing this log to happen. 直接在浏览器中访问
http://example.com/Faviconico/index
不再将日志恢复到原来的位置,而是以某种方式使用户仍然导致该日志发生。
How can I prevent logging of 404 Page Not Found: Faviconico/index
? 如何防止
404 Page Not Found: Faviconico/index
日志记录404 Page Not Found: Faviconico/index
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.