Page 1 of 1

Having issues with Parsing PHP in .HTML Files

Posted: Mon Apr 14, 2014 1:00 pm
by danielnr87
Hi All,
I have an issue parsing PHP in .HTML Files. I am using an install of Vesta (on digitalocean) and the domain is running fine. The site in question has AddType application/x-httpd-php4 .htm .html and AddType application/x-httpd-php5 .htm .html in the .htaccess, which before I moved it was allowing php to run in html.

I can't figure out for the life of me why its not now working? I don't get any errors in the logs either. I don't know if it is something to do with the way vesta has set up?

Has anybody got any ideas?
Thank you
Dan Williams

Re: Having issues with Parsing PHP in .HTML Files

Posted: Wed Dec 30, 2015 6:16 pm
by jimmyeao
Did you ever resolve this? Im having the same issue.
Using Apache+Nginx, editing the .htaccess seems to have no effect. I tried putting some junk in the .htaccess just to prove it was being read, and got a 500 error as expected.
So why is Apache ignoring the changes to the .htaccess

Re: Having issues with Parsing PHP in .HTML Files

Posted: Thu Jan 07, 2016 2:46 pm
by skurudo
There is several ways:
- htaccess

Code: Select all

AddType application/x-httpd-php .htm .html
- apache2 (/home/user/conf/web/apache2.conf - directory)

Code: Select all

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