问题
i have apache 2.2 and php 5.3.8 installed on my pc running windows 7, and i was trying to send http responses using the php. but i realized that apache automatically adds some headers like Date: and Server: in the response. is there any way to prevent this? i don't want any header to be added by apache.
thanks in advance
回答1:
You can minimize the header output of Apache by setting the following two lines in you apache2.conf:
ServerTokens ProductOnly
ServerSignature Off
This will disable the servers signature. http://httpd.apache.org/docs/2.0/mod/core.html#serversignature
As for the Date header, this is required by the HTTP standard.
来源:https://stackoverflow.com/questions/8031315/disable-all-apache-added-headers