Hide X-Powered-By: PHP
By Kai Seidler on Sep 16, 2009
About two weeks ago I showed a simple way to beautify your URLs and hide the use of PHP as the backend of your web site. Since I got a lot of emails from people indirectly asking me how to also hide the X-Powered-By: PHP header which is still showing up in ones web server's HTTP response.
As so much in our beautiful world of IT it's very easy:
- Open your php.ini in the editor of your trust.
- Find this line:
; Decides whether PHP may expose the fact that it is installed on the server ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. expose_php = On
- Change the On to an Off:
expose_php = Off
- Reload your Apache and the X-Powered-By: PHP header is gone.
Very easy, no magic(k), and no rocket science.