Hello,
Any idea how to make the "addhandler php html" so that php code to work within html files, by using .htaccess on an i-mscp web server?
More info: i-mscp 1.1.12, on Ubuntu 14.04 LTS, PHP 5.5.9 and Apache 2.4.7
Thanks!
Hello,
Any idea how to make the "addhandler php html" so that php code to work within html files, by using .htaccess on an i-mscp web server?
More info: i-mscp 1.1.12, on Ubuntu 14.04 LTS, PHP 5.5.9 and Apache 2.4.7
Thanks!
Read this: PHP Script in html --> allow override?
Unfortunately it is written in a language that I don't know. Hopefully Google Translate is going to be a good assistant.
I will take a look on my magic marble..
Wait... Wait... Wait..
Here the answer:
Take a look in you error log.
Thanks for the help but it does not solve the problem. The website of a customer has php code inside the normal html file and aparently it's not working.
Indeed, in that specific case, the rewrite rules above will not work because they are asking apache to translate any virtual <whatever>.html file to real file <whatever>.php.
you'are using php5-fpm?
If yes, you should try to add this in the .htaccess of your customer;
Note: (You'll have maybe to change it vhost to allow those directive in its .htaccess file.
and also edit its fpm pool conffile to allow execution of .html files.
Note: Not tested
I had to modified the
to
I'm using php-fpm indeed. I include the .html entry on security.limit_extensions and the effect is that the file is not executed, the browser starts to download the file.
The fpm pool is located in /etc/php5/fpm/pool.d/ isn't it?