PHP in .html extention

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
jslick
Forum Commoner
Posts: 35
Joined: Wed Jul 21, 2004 11:18 am

PHP in .html extention

Post by jslick »

I found this article by feyd: http://www.javascriptkit.com/howto/htaccess4.shtml
It describes how to enable SSI through .htaccess and how to enable it with .html, too. How could I do that with PHP? So, how could I make it so I can have PHP in .html extentions?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that actually isn't by me.. :D

The easiest way to do it, if you have access to the type controls is just tell apache .html files are to be processed at php files.
jslick
Forum Commoner
Posts: 35
Joined: Wed Jul 21, 2004 11:18 am

Post by jslick »

This: http://www.javascriptkit.com/howto/htaccess.shtml
Tutorial written and contributed by Feyd, moderator of the JK Forum. Please see tutorial footnote for additional/bio info on author.
Are you not that feyd?

You mean shell access? I dont' have shell access. Is there not a way to do it with .htaccess. If so, how?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Correct, that is not me. Purely coincidence.. I guess we both like Dune a bit :)

it can be done through cpanel, in the extension types manager...
jslick
Forum Commoner
Posts: 35
Joined: Wed Jul 21, 2004 11:18 am

Post by jslick »

feyd wrote:Correct, that is not me. Purely coincidence.. I guess we both like Dune a bit :)

it can be done through cpanel, in the extension types manager...
Mime types???
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yep.. the mime-type manager..
jslick
Forum Commoner
Posts: 35
Joined: Wed Jul 21, 2004 11:18 am

Post by jslick »

But doesn't let me edit, just add a new one, and the .php extention already exists. Do I just add another one? Will it overwright the other one? Kind of confused.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

adding a new type will overwrite/overload the other one..

Code: Select all

User Defined Mime Types
application/x-httpd-php	.html .js .css
is what I had in a recent project..
jslick
Forum Commoner
Posts: 35
Joined: Wed Jul 21, 2004 11:18 am

Post by jslick »

okay, I don't think I'll do it then.
Post Reply