AddType application x-httpd-php .html not working

Hi,

If you are trying to execute php coding with html page. You will be directed to add the following line to your .htaccess file.

 

AddType application x-httpd-php .html .htm

But this sometime won’t work it will simple ask you to download that .html page. If you are facing issues like this all you need to do is, edit the above line to

 AddType application x-httpd-php5 .html .htm

Problem
=======
The server is running in php version 5 and it needs an 5 suffix at the end of x-httpd-php like x-httpd-php5.

 

To make them work on server wide you need to add

 

AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml .html

In your php.conf file.

Thank you for viewing helpinlinux.com

Leave a Reply

Protected by WP Anti Spam