Forum Moderators: coopster

Message Too Old, No Replies

Parse .html as PHP stopped working

         

easywebhost

4:29 am on Jun 7, 2005 (gmt 0)

10+ Year Member



I recently upgraded an old 4.2.2 PHP to 4.3.11
One change I made after was to get my .html files to parse thru PHP. Yes, I've read for years not to do this, but I do anyway.

I accomplish this by changing:

AddType application/x-httpd-php .php
to
AddType application/x-httpd-php .php .html

But now, all my apache redirects don't work, and the apache error pages want to download.

The .html parse thru PHP, and ofcourse .php is fine.

I've covered everything I know, and would like to know if anyone else has come across before.

Thanks
DJ

roldar

6:18 am on Jun 7, 2005 (gmt 0)

10+ Year Member



I'm not sure I can be of much help regarding your question, but if you want to avoid the hassle of parsing HTML as PHP you could change all your files to .php and then use mod_rewrite to change the URL back to .html.

jatar_k

4:35 pm on Jun 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld easywebhost,

I assume you are sure that is the only change you made?

given the line was already there it shouldn't be the order of things, just adding the html to the end shouldn't do that

did anything else change in your conf file?

easywebhost

6:29 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



Hi,
Yes it was the only thing changed.
I am now able to get php parsed in html files by adding the same line to .htaccess in the root web directory of the web sites.
I guess that will do, but not sure why it worked before, but not now. Must be a compile option.
Thanks
Doug