Forum Moderators: phranque

Message Too Old, No Replies

SSI - Server Side Includes

Using SSI to replace content. What am I doing wrong?

         

spikeengineer

4:33 pm on May 2, 2004 (gmt 0)

10+ Year Member



Hi, I'm attempting to use SSI.

For example, I want to include a footer on every page. I also want to replace some HTML content. I'm doing so as follows:

<!--#include virtual="./ssi/footer.txt"-->

and

<!--#include virtual="./ssi/home.htm"-->

The page loads properly, but when I click a link to the page, or another page with SSIs in it, they don't load at all.

Am I using them improperly, or is there a way to fix this?

web_india

5:12 pm on May 2, 2004 (gmt 0)

10+ Year Member



Check your link paths. If you are using relative links, try changing to absolute paths and see if the problem still persists.

spikeengineer

2:05 am on May 3, 2004 (gmt 0)

10+ Year Member



That didn't seem to have any effect. What I find odd is that it loads the SSI includes fine when I first open it, but it doesn't when I click a link.

Any thoughts?

Edit: They actually only works when I test it in Dreamweaver. When I open it seperately, or open a link from the test, they seem to have no effect.

uncle_bob

9:03 am on May 3, 2004 (gmt 0)

10+ Year Member



Edit: They actually only works when I test it in Dreamweaver. When I open it seperately, or open a link from the test, they seem to have no effect.

Are you trying to run then from your local harddrive, or from the webserver? As the name implies, ServerSideIncludes need to be run from a webserver, and of course the webserver needs to have SSI enabled.

spikeengineer

11:21 am on May 3, 2004 (gmt 0)

10+ Year Member



I was attempting to run it from my hard drive, yes, but I also tested it on the server I'm using. How can I enable SSI? I don't think I have much control over the server. Is there another solution if I can't enable SSI?