Quick Tip for HostGator Customers Using .htaccess and PHP

If you have an .htaccess directive telling Apache to serve all or certain types of files as PHP, HostGator’s setup is just a little bit different.

On a stock WHM/cPanel/CentOS 5 server,

DefaultType application/x-httpd-php 
is what you need. On HostGator’s servers, though - or at least their reseller accounts - you need to specify the PHP version, like so:
DefaultType application/x-httpd-php5 

Without that, Apache will ask you to download the the unparsed PHP file, complete with original code.


Posted on Apr 02, 2009 - 09:23 AM

Leave A Comment!!

Please enter the letters or word you see in the image below:

Name:

Email:

Location:

URL:

Remember this information for next time

E-mail me about follow-up comments