Help - Search - Members - Calendar
Full Version: Ssi
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
aussiemcgr
I need to use SSI on my website and I was told i could parse .html as php so I dont have to change all my websites to php for my SSI to work. Can anyone help me out in doing this, I have been trying to figure it out for several days now.
Jetteh22
Umm...

You're trying to make your .html ACT like PHP?

I dunno if this is possible with Zymic if you're on a zymic server but if you're on your own server and you have access to cPanel go to MIME Types...

And then add one as
MIME Type - application/x-httpd-php
Extension - html

I think that would work.. As I can make an extension like .dk22 and have it act like it's PHP
aussiemcgr
So is Zymic like COMPLETELY unfriendly with SSI or something cause this has been a lot more difficult then it has to be.
Jetteh22
I have no clue what SSI is...
aussiemcgr
Server side includes. Its purpose is to make it easier to create navigations and other stuff that you want to have on all your pages for your website. It is a more browser, search engine, and design friendly alternative to iframes.
Jetteh22
Ah, I use php includes myself (along with most people I assume).

Didn't know it was called SSI...

I thought you could do it in javascript too.. Did you try that?

I could be wrong too, though so don't hold me to it (i suck at javascript)
aussiemcgr
ill give javascript a shot, cause I personally hate php.
prixat
I thought it was something that had to be enabled on the server.

Its worth posting in Hosting/General Discussion just to check it has been enabled.
Gawdl3y
Ahh, so simple. If Zymic allows htaccess, make a file called '.htaccess' and in it, put:

CODE
AddHandle html application/x-httpd-php
NaRzY
Why do you not just use the PHP include?
Works out easier if you change them to PHP.

Jacob.
Jetteh22
That's what he was trying to do, Narzy tongue.gif

But that would mean he would have to go through every single one of his pages and find the ".html" and replace it with ".php" so that they will work with the header.php and footer.php.

What he was wanting to do was find a way using mime-types to have the .html files act like .php files so that even if it was index.html it would still act like a PHP file so it would allow PHP in the coding.
NaRzY
It would be more intelligent to do it all in PHP though.

Jacob.
Jetteh22
I agree in that sense,
but only if you are starting it all from scratch.

If he's already got a website made with 20+ pages all in HTML and he wants to include a header or footer on each of those it would be ALOT easier to change mime types to have HTML read as PHP than it would be to go through and re name every single html page to ".php"...

Just my opinion.
aussiemcgr
O, I didnt know this thread was still going. This prob was fixed LONG ago, just went with .php for my sites. Feel free to lock or delete this thread.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.