Alternative header_remove

I know that header_remove does not work in php versions <5.3, and I use 5.2.1. I am looking for an alternative to header_remove to remove the X-Powered-By header.

I tried using the header ("X-Powered-By:"); but it still generates an empty header. I tried using Header unset X-Powered-By in .htaccess, but for some reason it does not work. I'm stuck here.

+7
php header
source share
1 answer

AFAIK, there is no replacement for this function, but you can either change the result to something fictitious, as described above, or configure php.ini to block this header with the following expression:

expose_php = Off 
+2
source share

All Articles