dongyong2906 2018-05-25 11:55
浏览 66

Codeigniter日志中的奇怪404错误

for the past week or so I've noticed I've been getting a lot of strange 404 errors in logs on a Codeigniter based site. A few examples:

404 Page Not Found: Apple-touch-iconpng/index
404 Page Not Found: 404javascriptjs/index
404 Page Not Found: 404testpage4525d2fdc/index
404 Page Not Found: Faviconico/index

Some of them are things that exists (apple-touch-icon.png), but the 404 error has missing file extensions, and a "/index" after it. Some of them are files that don't even exist (404testpage4525d2fdc). I've run through the entire site looking for broken links, and there are none. I'm also not getting any 404 errors showing on the actual site - just in the logs.

My .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

And my routes file:

$route['default_controller'] = 'welcome';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route[LOGIN_PAGE] = 'users/login';
$route['landlords'] = 'listings/directory/1';
$route['complexes'] = 'listings/directory/2';
$route['managers'] = 'listings/directory/3';
$route['apartments/sublets'] = 'listings/index/13';
$route['apartments/roommates/19'] = 'listings/index/19';
$route['apartments/roommates/20'] = 'listings/index/20';
$route['apartments/roommates/21'] = 'listings/index/21';
$route['apartments/roommates/22'] = 'listings/index/22';
$route['apartments/roommates'] = 'listings/index/14';
$route['apartments/listings'] = 'listings/index/15';
$route['apartment-alerts'] = 'notification/add_notification';
$route['apartments/listings/([0-9]-(beds))'] = 'listings/index/$1';

Like I said, the site itself seems to be working fine, but I can't figure out what's causing these errors to show up in the logs. I've tried searching for answers, but they all seem to be dealing with 404 errors that are showing up on the site, and are actual resources that should be on the server. Any help would be greatly appreciated!

  • 写回答

1条回答 默认 最新

  • duanjiushu5063 2019-04-17 19:30
    关注

    As near as I've been able to figure out in last 20 minutes of research, 404testpage4525d2fdc and 404javascript.js appear to be requested by scanners checking for malicious behavior, particularly on sites using WordPress. (I would guess your rewrite rule is stripping periods from and appending /index to any requested file which doesn't exist.)

    One such scanner is Securi. Check your website via https://sitecheck.sucuri.net/results/www.example.com then immediately check your access logs and you'll likely see a new entry for one or both of these locations.

    Other web crawlers, likely search engines, are trying to retrieve Apple-touch-icon.png and Favicon.ico to get a logo from your website.

    评论

报告相同问题?

悬赏问题

  • ¥15 C#调用python代码(python带有库)
  • ¥15 矩阵加法的规则是两个矩阵中对应位置的数的绝对值进行加和
  • ¥15 活动选择题。最多可以参加几个项目?
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题
  • ¥20 云服务Linux系统TCP-MSS值修改?
  • ¥20 关于#单片机#的问题:项目:使用模拟iic与ov2640通讯环境:F407问题:读取的ID号总是0xff,自己调了调发现在读从机数据时,SDA线上并未有信号变化(语言-c语言)
  • ¥20 怎么在stm32门禁成品上增加查询记录功能
  • ¥15 Source insight编写代码后使用CCS5.2版本import之后,代码跳到注释行里面
  • ¥50 NT4.0系统 STOP:0X0000007B