Trouble with server side include

liunx

Guest
Hi all.<br />
<br />
I've set up a couple of SSI files in a seperate folder called "ssi" within my root folder. One file contains an image and the other plain text. Within each page I call the files with a <!-- include virtual="name.inc"--> statement (virtual for Apache servers, according to DWMX). When I preview each page in a browser from Dreamweaver, everything is ok, but when I click on the links to the other pages, the included stuff is gone - even when I click to go back to the original page.<br />
<br />
I'm new to SSI's, so I assume I'm doing something wrong, but can't figure out what it is!<br />
<br />
Any help is appreciated.<br />
<br />
Ted<!--content-->Have you named the other files appropriately? They should have a .shtml extension, unless your employing a server-side technology in which case it should work as is.<br />
<br />
Also, for sake of debugging, try the pages using the 'file' keyword apposed to 'virtual'.<br />
<br />
Regards,<br />
Andrew Buntine.<!--content-->Thanks for the reply, Andrew.<br />
<br />
Do you mean the web page file names (as in, changing index.html to index.shtml)? If so, I tried this and it didn't work. Not only did it not work by itself, but Dreamweaver doesn't seem to recognize the shtml extension and will not allow me to preview the pages in a browser.<br />
<br />
This doesn't seem like difficult stuff, but it's got me stumped!<br />
<br />
Ted<!--content-->you need something<br />
<br />
<br />
<!--#include virtual="name.inc"--> <br />
<br />
<br />
And Dreamweaver will not process the SHTML unless through an HTTP connection becuase the SSI requires the server to run<!--content-->Does your server have support for SSI? Your not testing locally are you?<!--content-->crh3675: He already has the code, mate. ;) Its in his initial post.<!--content-->Did you see the # in his initial post?<br />
<br />
<!-- m --><a class="postlink" href="http://httpd.apache.org/docs/howto/ssi.html">http://httpd.apache.org/docs/howto/ssi.html</a><!-- m --><!--content-->True. You win.<!--content-->Well...yes, I am testing on my machine. Is this the problem? Do I have to put the files up to my host server before it fully works?<br />
<br />
Ted<!--content-->Sometimes it takes many eyes...:cool:<!--content-->The # is in my code, I forgot it here.<br />
<br />
Here's the code in each page (copied):<br />
<br />
<div id="logo"><br />
<!--#include virtual="inc/dovelogo.inc" --><br />
</div><br />
<br />
Ted<!--content-->Ok, then i win! sorta-not-really :rolleyes: <br />
<br />
Yes, Server Side Includes needs to be processed on the server. SSI files usually contain server-side source code (or modules) which needs to be executed through-out an entire web site.<br />
<br />
Regards,<br />
Andrew Buntine.<!--content-->I was just about to say that :)<!--content-->Andrew and Craig,<br />
<br />
I put the pages up to the server, renamed each page to have the .shtml extension, and voila - it works!<br />
<br />
Thanks so much for the help!<br />
<br />
On to my next head-scratching adventure.<br />
<br />
Ted<!--content-->
 
Back
Top