网站任何路径请求都是404,访问日志都是GET /index.php,似乎都被定向到index.php了,怎么回事?

无论我访问root.com/还是root.com/index.html,都是404打不开页面,我查看访问日志,发现不管什么路径的请求都会被定向到/index.php上

日志:

#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2017-02-23 12:22:05
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status 
2017-02-23 12:22:05 W3SVC223192134 121.199.27.219 GET /index.php - 80 - 117.136.81.240 Mozilla/5.0+(iPhone;+CPU+iPhone+OS+10_2_1+like+Mac+OS+X)+AppleWebKit/602.1.50+(KHTML,+like+Gecko)+CriOS/56.0.2924.79+Mobile/14D27+Safari/602.1 404 0 2
2017-02-23 12:22:05 W3SVC223192134 121.199.27.219 GET /favicon.ico - 80 - 117.136.81.240 Mozilla/5.0+(iPhone;+CPU+iPhone+OS+10_2_1+like+Mac+OS+X)+AppleWebKit/602.1.50+(KHTML,+like+Gecko)+CriOS/56.0.2924.79+Mobile/14D27+Safari/602.1 404 0 2
#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2017-02-23 12:42:35
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status 
2017-02-23 12:42:35 W3SVC223192134 121.199.27.219 GET /index.php - 80 - 121.199.27.219 Mozilla/5.0+(Windows+NT+5.2)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.106+Safari/537.36 404 0 2
2017-02-23 12:42:35 W3SVC223192134 121.199.27.219 GET /index.php - 80 - 121.199.27.219 Mozilla/5.0+(Windows+NT+5.2)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.106+Safari/537.36 404 0 2
2017-02-23 12:42:37 W3SVC223192134 121.199.27.219 GET /index.php - 80 - 121.199.27.219 Mozilla/5.0+(Windows+NT+5.2)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.106+Safari/537.36 404 0 2
2017-02-23 12:42:40 W3SVC223192134 121.199.27.219 GET /favicon.ico - 80 - 121.199.27.219 Mozilla/5.0+(Windows+NT+5.2)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.106+Safari/537.36 404 0 2
2017-02-23 12:42:40 W3SVC223192134 121.199.27.219 GET /index.php - 80 - 121.199.27.219 Mozilla/5.0+(Windows+NT+5.2)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.106+Safari/537.36 404 0 2
2017-02-23 12:42:41 W3SVC223192134 121.199.27.219 GET /index.php - 80 - 121.199.27.219 Mozilla/5.0+(Windows+NT+5.2)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.106+Safari/537.36 404 0 2
2017-02-23 12:42:41 W3SVC223192134 121.199.27.219 GET /favicon.ico - 80 - 121.199.27.219 Mozilla/5.0+(Windows+NT+5.2)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.106+Safari/537.36 404 0 2
2017-02-23 12:42:42 W3SVC223192134 121.199.27.219 GET /favicon.ico - 80 - 121.199.27.219 Mozilla/5.0+(Windows+NT+5.2)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.106+Safari/537.36 404 0 2
2017-02-23 12:45:49 W3SVC223192134 121.199.27.219 GET /index.php - 80 - 27.17.73.166 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/55.0.2883.44+Safari/537.36 404 0 2
2017-02-23 12:45:49 W3SVC223192134 121.199.27.219 GET /favicon.ico - 80 - 27.17.73.166 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/55.0.2883.44+Safari/537.36 404 0 2
2017-02-23 12:45:55 W3SVC223192134 121.199.27.219 GET /index.php - 80 - 27.17.73.166 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/55.0.2883.44+Safari/537.36 404 0 2

网站的默认文档有这些,并没有设置index.php:
图片描述

请问这是怎么回事?我要怎么解决?

阅读 4.1k
1 个回答

查看主目录路径设置对不对。

clipboard.png

还有个可能就是服务器被挂马了。或者打开你的index.html,看看源码中是否被插入了非法的JS。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题