Hey guys I think I've tried everything I can find myself so hopefully someone here can help me.
I'm using php include for a header and footer, but for now just testing pulling a little code through. When my test page is a php file, with the code to include another php file, the inclusion works perfectly. So with this I know my hosting has working php. However when I change the extension of the test page to html nothing comes through.
I have tried adding various lines to my .htaccess file (which is currently blank) and none have worked. They either have no effect, or instead of viewing my webpage Chrome downloads it instead, both php and html files. Like I said my .htaccess is currently blank.
Various lines of code I have tried adding to my .htaccess file (which by the way sits in my public_html folder). Spaces separate combinations used.
AddType application/x-httpd-php .php .htm .html
AddHandler x-httpd-php5 .php .htm .html
AddHandler application/x-httpd-php5 .html .htm
AddType application/x-httpd-php .html .htm
AddHandler application/x-httpd-php .html .htm
AddHandler x-httpd-php .html .htm
AddType application/x-httpd-php .htm .html
AddHandler x-httpd-php .htm .html
allow_url_fopen = 1
allow_url_include = 1
short_open_tag = 0
<h1>Welcome to my home page!</h1>
<p>Some more text.</p>
<?php include 'footernew.php';?>
<p>This is a test page using php include</p>
I had the same problem, Godaddy Linux hosting PHP5.5. After 3 tech support calls with no solution I ended up using the code below in the .htaccess file in the public_html folder so when a visitor asks for a .htm file the server will serve a .php file of the same name and pretend it is the requested .htm file. Godaddy is the worst of the worst but in my case this work around saved me, hope it works for you situation.
RewriteEngine on RewriteBase / RewriteRule ^(.*)\.htm$ $1.php [nc]