2.4.3.16. PHP code does not work in HTML files or download.php file is downloaded instead of opening the site
This situation can arise when you try to .htaccess
override files processed by PHP. For example like this:
RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html
This construct can only be used when PHP is running in mod mode._php. PHP runs in a different mode on our servers — fastcgi, so handlers need to be redefined differently.
For PHP to additionally process files with the extension .html
:
- V site settings in field «PHP files» add
.html
and save your changes. - Wait about 10-15 minutes and check for the problem.