This article describes the method of hiding the version output x-powered-by of the PHP header under the reference of a friend who needs it. In the PHP program, the default output header information: (status-line) http/1.1 okdate Wed, 02:30:46 gmtserver apache/2.2.13 (Win32) x-powere D-by:php/5.2.3content-length 30keep-alive timeout=5, max=100connection keep-alivecontent-type text/html To avoid outputting the above version information, you can modify the php.ini expose_php to change the default on to OFF. Hide and disguise Apache version, hide php head version, you can refer to the following methods. 1, added in Apache http.conf: Serversignature offservertokens Prod Where serversignature off tells Apache to not display server version information on error pages (such as HTTP status 404), but this option does not affect pages that are normally accessible (HTTP status 200, and so on). Server version information is still available in the server header for normal access to the webpage. Servertokens prod tells Apache to return only Apache in the server header (server header) and does not return version information for the server operating system and Apache. 2, Hide php header version php.iniexpose_php = off hidden PHP program head issued: x-powered-by:php/5.2.4 similar information Set in the php.ini file: expose_php = off to avoid output: x-powered-by:php/5.2.4 version information. |