Skip to main content
edited tags
Link
dr_
  • 32.4k
  • 22
  • 102
  • 148
Source Link
dr_
  • 32.4k
  • 22
  • 102
  • 148

How to have .html files pass through the PHP preprocessor?

I would like to configure an Apache webserver 2.4.37 to hide the fact that it is serving PHP files.

For this, I renamed all .php files to .html and inserted the following directive:

AddType application/x-httpd-php .htm .html

as suggested here.

However, this does not work; all .html files are not passed through PHP. Any ideas?

The version of PHP installed is 7.2.24.