SSI - Everything about Server-side includes

They have: 9 posts

Joined: May 1999

My god... I was wondering if this was possible and I now know it is, thank you so much! Hooray! Please email me or reply about how to do this!

----------
[=- cmcm =]
[=- [email protected] -=]

They have: 9 posts

Joined: May 1999

Okay, i'm seeing all these posts about using SSI in a website, and even my own site has a SSI that I was required to put in (just a simple line for the banner code, didn't know what it means). I want to know where I can get more information on SSI and maybe even how to make one myself. What can SSI be used for also?

----------
[=- cmcm =]
[=- [email protected] -=]

They have: 2,390 posts

Joined: Nov 1998

Sir,
SSI is often used to make updating a website a much simpler task. I for one have my site split into three columns. The right and left columns tend to be the same on all pages while the center column varies on each page.
To avoid having to update each page when I wanted to change the right or left columns I have these on separate files called up by SSI when on the server.
This means that EACH page on my sites calls for just ONE right/left column file - meaning if I update this file all the pages get updated.
If you need help in setting up SSI on your site (or are even more confused after the above expl. Smiling, just ask.
JP

----------
The Webmaster Promotion and Resource Center.
http://www.what-next.com

They have: 5,633 posts

Joined: Jan 1970

may i put my comment here? Smiling
i am also about to build my new page and i also use SSIs for the most parts.
follow these easy steps:
rename the html-file you want to use from .html to .shtml, this makes the server not just pass the data to the browser, but to read the file and execute SSIs.
then, insert this code at the place you want your ssi-output to be displayed:
<!--exec cgi="nameofscript.cgi"-->

whenever somebody calls this page with a browser he will not see this code but only the output of the cgi, that's all!
hope it's clear to you, if not feel free to ask again....
cu
patrick

----------
http://www.allcgi.de
not quite up yet, but see if you can find something for you!

They have: 9 posts

Joined: May 1999

Cool, that would work. But is there any possible way to just call another HTML file or something instead of a CGI? I have CGI access, but it's on a different server, so I have to link to the different server to run a CGI and it's a real pain.

----------
[=- cmcm =]
[=- [email protected] -=]

They have: 359 posts

Joined: Mar 1999

Was in another discussion, but what is the line that goes in your .htaaccess file so you don't have to rename your files shtml. Easier to ask than to look Wink and it goes with this discussion anyway.

----------
Dan
http://cds-computers.com

Dan
Recycle Video Games Network

Stupidity killed the cat, curiosity was framed!

He has: 150 posts

Joined: Apr 1999

I think it's:
AddHandler server-parsed .html

Hope this helps. Wink

They have: 220 posts

Joined: May 1999

Patrick showed you how to call and execute a CGI script. To include a html file just use this format:

<!--#include virtual="nameoffile.html"-->

Now, you don't even have to name your include files with a .html extension. In fact, I have a subdirectory for my includes and use the extension of .incl ... so my includes look like this:

<!--#include virtual="incl/nameoffile.incl"-->

When your .shtml file is processed by the server (or your html file is defined by an .htaccess), the server will take the file of the include and simply insert it where you have that line. I use it for my Text links and my left side image maps on my internal pages.

If you need further assistance, feel free to ask,
Matt

----------
1-On-1 Free Basketball Game - Wanna Play?
http://basketball-game.com

1-On-1 Free Basketball Game - Wanna Play?
http://basketball-game.com/
Thousands of Players around the World compete weekly!

They have: 24 posts

Joined: May 1999

I need a sample code on SSI how it is being code and also how it is being tag to a html file.

thank you very much.

They have: 24 posts

Joined: May 1999

by the way do i need any software if i try to run the SSI in my PC not a server?
so does that mean to have <!--#include virtual="abc.html"--> in my other html page. i can run normally in my pC????

They have: 5,633 posts

Joined: Jan 1970

i will mail you a demo SSI page...

you can't run a SSI-side on your pc, it has to be parsed by a server-program. i recommend OmniHttpd for a Win-machine, it's very easy tu use and install
OmniHttpd can be downloaded at: omnicron.ab.ca
ask me, if you run into troubles with the upset Wink
cu
patrick

They have: 2,390 posts

Joined: Nov 1998

...actually Dreamweaver2 now recognises (and displays) SSI's when working in the program.
JP

----------
The Webmaster Promotion and Resource Center.
http://www.what-next.com

They have: 24 posts

Joined: May 1999

Thanks Patrick . but i need to run it on a NT workstation. I was wondering whether a Personal Web Server(PWS) will work for SSI or not.

If yes I hope to understand the procedure needed to make it run on a PWS.

They have: 5,633 posts

Joined: Jan 1970

may i mention that i am running OmniHttpd at my NT4.0 workstation Smiling

i havent bothered to use pws yet, maybe somebody else?
but i am 100% sure that OmniHttpd, apache, xitami and even sambar are working on an nt workstation and they can handle SSIs as well Wink

They have: 24 posts

Joined: May 1999

well. i am currently using the Personal Web Server and InterDev to execute the programe but my SSI still cannot work. I was really wondering izzit something wrong with my code.
i just add <!--#include virtual="myfile.inc"--> inside the body of my another HTML file so.............
can somebody advise me whether this line of code is correct or not.

Thanks

They have: 24 posts

Joined: May 1999

thanks John. I really appreciate that. Hope that you can provide me with what sort of configuration I need to do to my Personal Web Server ASAP.

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

The code looks just fine, I'm thinking you might need to set or install something to make SSI work on the Personal Web Server. I'm not sure which it is though, but I'm off to investigate.... Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.