$_SERVER['HTTP_HOST'] not set

后端 未结 2 362
醉梦人生
醉梦人生 2021-01-12 12:32

I am getting lot of traffic to my php pages but without the variable $_SERVER[\'HTTP_HOST\'] set.

This traffic is like 1 hit per second. I don\'t know w

2条回答
  •  时光取名叫无心
    2021-01-12 13:29

    HTTP_HOST is a part of the client's HTTP request and specifies which host name the request is to be directed to. It is necessary to tell apart the right site in a multi-site setup.

    If HTTP_HOST is not set, the client is either very, very old (HTTP 1.0 doesn't support HTTP_HOST) or has made a request directly to your web site's IP.

    I can't see any harm in blocking that the way you do. However if you are worried about traffic, it might be wiser to fix this on web server level.

提交回复
热议问题