Click to See Complete Forum and Search --> : making PHP translate all html files


danielpritchett
02-05-2002, 05:42 PM
I have an apache server with php4.

i'd like to make it where ALL html files are sent through php, so that i can put php code in html files and have it still processed by php before going to the user.

basically, i want an index.html with php code to be translated by php, even though it doesn't have the .php extension.

any ideas?

Anon
02-05-2002, 06:21 PM
From last month\\\'s Linux magazine:

Open the Apache\\\'s httpd.conf file

find this line:
AddtType application/
x-httpd-php .php

and change it to:
AddType application/
x-httpd-php .php .html

Then restart Apache.

danielpritchett
02-05-2002, 06:47 PM
cool! i figured that out myself after an hour of reading docs, and then decided i didn't want to do it anyway. it's a good thing to know, though.

thanks for your help :)