This article describes how to hide the version output x-powered-by of the php header. if you need it, refer to it. In the php program, the header information is output By default: (Status-Line) HTTP/1.1 200 OKDate Wed, 23 Feb 2011 02:30:46 GMTServer Apache/2.2.13 (Win32) X-Powered-: PHP/5.2.3Content-Length 30Keep-Alive timeout = 5, max = 100 Connection Keep-AliveContent-Type text/html To avoid outputting the above version information, you can modify the expose_php of php. ini to change the default On to Off. You can use the following methods to hide and disguise Apache and php headers. 1. add ServerSignature OffServerTokens Prod in Apache http. conf. Among them, ServerSignature Off tells Apache that the server version information is not displayed on the error page (such as HTTP Status 404), but this option does not affect the pages that can be accessed normally (such as HTTP Status 200 ). The Server Header that normally accesses the webpage still contains the Server version information. ServerTokens Prod tells Apache to only return Apache in the Server Header information, and does not return the version information of the Server operating system and Apache. 2. hide the php header version php. iniexpose_php = Off. hide the information similar to X-Powered-By: PHP/5.2.4 sent By the PHP program header. Setting expose_php = Off in the php. ini file can avoid output of version information such as X-Powered-By: PHP/5.2.4. |