Welcome to WebmasterWorld Guest from 54.160.254.203

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How can I process .html files like .php files?

I need to process .html files like php files..

     
11:54 am on Jul 24, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 14, 2003
posts:66
votes: 0


I need to place php script in .html files and have the server process them like .php files. I only have access to the control panel (CPanel). Is that possible?

Cheers,
EPSRX

3:11 pm on July 24, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member marcia is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 29, 2000
posts:12095
votes: 0


I've just gotten finished moving a site and it just resolved - and I just got done setting up this very thing. It's got Cpanel with this as default

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

A PHP include didn't work with just that so I added this and it's working just fine on .html pages

AddHandler application/x-httpd-php .html .php

MIght be more than needed, but that's what I found when looking up what to do.

5:10 am on July 26, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 14, 2003
posts:66
votes: 0


Thanks Marcia

Where in the Cpanel do I add the above mentioned lines. I am new to PHP and so I would appreciate any help I can get :)

11:55 am on July 26, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Oct 15, 2003
posts:276
votes: 0


You don't have to place it anywhere in Cpanel. You need to place it in your .htaccess file.
1:40 am on July 27, 2004 (gmt 0)

New User

10+ Year Member

joined:July 27, 2004
posts:2
votes: 0


I did the same thing but through CPanel.
I clicked on the "Apache Handlers" icon then typed in "application/x-httpd-php" for html.