htaccess php problems

vzorn
vzorn used Ask the Experts™
on
I have inherited a site build using php.  The actual files are html and the htaccess file I believe tells the server to run the html files as php files.  Here is the code:

AddType application/x-httpd-php .html .htm .php .inc
XBitHack full

Options +FollowSymLinks

<IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteRule ^([^/]+).faq$ content.php?id=$1
      RewriteRule ^([^/]+).news$ content.php?id=$1
      RewriteRule ^([^/]+).blog$ content.php?id=$1
</IfModule>

I had to get a new server.  It is LInux and I am using a Plesk interface.
I have created all the sites.  We have not changed the DNS until the sites are finished.
I cannot view the sites.  As soon as I put in the IP address the browser tries to download the index.html file.  
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2016

Commented:
Try adding this to your .htaccess file.
AddType application/x-httpd-php5 .html .htm .php

Open in new window

Author

Commented:
I took out everything and just added the one line.  
It tries to download the index.html file still.

Author

Commented:
my phpinfo does not display the Apache information.
My hosting company keeps telling me it is running on the server.
I am using a Plesk interface
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Does the downloaded file contain PHP code?

Actually, try creating a file like "info.php" and putting this in it:
<?php
phpinfo();

Open in new window


Go to the PHP script directly.  If it tries to download, PHP isn't enabled; if it works (and you get information about PHP), then the problem is something with content type.
Most Valuable Expert 2011
Top Expert 2016
Commented:
hosting company keeps telling me it is running -- they may need to restart the server?

Please do us a favor and tell us who the hosting company is.  Thanks, ~Ray

Author

Commented:
Yes PHP is working, I get all of the phpinfo details.  
My hosting company is hostgator, we have VPS.
I will ask them to restart the server.

Most Valuable Expert 2011
Top Expert 2016

Commented:
Hmm... Hostgator is pretty good about stuff like that.  What is the URL of your index.html?  Is the .htaccess script in the same directory?

Author

Commented:
Hostgator has fixed the issue. They restarted the server.  I am not sure if they did anything else.

thank you for your help!
Most Valuable Expert 2011
Top Expert 2016

Commented:
Yeah, too bad you can't fix my car that way!  Thanks for the points, ~Ray

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial