Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

urgent htaccess problem - html as php

Status
Not open for further replies.
Joined
Jul 28, 2005
Messages
358
Location
FR
Hi,

I have a added an .htaccess file to a folder on my server to parse html files as php (I need this for a client who's site I am redeveloping with php but he has a load of page specific advertising which he wants to still work).

The .htaccess file I have created has the following line in it
Code:
AddType application/x-httpd-php .php .html
and the html file in the directory is just a basic php test file
Code:
<?
echo "tested correctly";
$test = "working";
echo $test;
?>

However, when I try to access the file I get a 500 error.

Any ideas what is going wrong with this?

I don't want to use redirects really, just want the html files to parse as php

Thanks,

Richard
 
richcleverley,

Just a hunch, but is PHP installed on this server? What does your apache error log show?

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Yep, php certainly is installed ( it runs the major script for the website).

Haven't looked at the apache error log yet, will do so now.

Richard
 
Oh well, my host seems to have sorted it now as it's suddenly all working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top