Running html as php via htaccess no longer working on freevirtualservers

Hi,
As per the title - I redirect via php to a mobile version of my site from my html website - using htaccess to parse as php has been fine till recently - Free Virtual Servers have been making changes and the code stopped working (revealing the php at the top of my page).

A quick Google got an alternative bit of code that worked perfectly - for just 2 weeks!

Today the site wouldn’t even open, merely downloading a file each time. FVS at first told me they ‘didn’t support such htaccess code’ then, on telling them my colleague runs several sites with exactly the same setup, they are now rethinking - but no answers.

This is the original working code:

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

Updated to:
AddType application/x-httpd-php .html .htm

Anyone else have similar issues with FVS?

To give FVS credit, they did eventually sort this out. I’m posting the answer in the hope that it may help others as I sure as hell couldn’t have stumbled across this solution on Google in a lifetime!!

I had to add all of this to my htaccess file:

AddHandler fcgid-script .php5 .php4 .php .php3 .php2 .phtml .html .htm
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php5
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php4
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php3
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php2
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .phtml
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .htm
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .html

Sponsor our Newsletter | Privacy Policy | Terms of Service