IIS 5 & IIS 6
SSI Server Side Includes -- Not working as advertised
Last post Nov 15, 2007 09:32 AM by sdeliasr
Nov 14, 2007 05:35 PM|sdeliasr|LINK
I'm trying to use SSI and am finding that the include statement is being treated as a comment. I can see it in "View Source" intact, the same as in the source file.
I've tried this under WinXP Pro and Windows Server 2003. Under the latter, I went into "Web Service Extensions" and allowed SSI.
Inside IIS, the virtual directory is taking the defaults that shows that the .shtml file extension points to the ssinc.dll
I know that this works with ASP pages, but I need to get it to work with an .html file as the "parent" page that is including a .shtml file.
I can send/show the sample code I'm using if that would help.
I've been googling and searching this issue like crazy and still haven't found anything close to explaining this.
Thanks in advance!
ssi server side include
Nov 15, 2007 08:43 AMfirstname.lastname@example.org|LINK
Show code. This should work fine:
<p>This was in the original file</p>
<!--#include virtual="include.inc" -->
<P>This is an included line</p>
Put them both in the root folder and call the first by name. Remember, only the extensions SHTM and SHTML work for the file to process HTML includes. I use INC as the extension for included files for clarity, they can be anything with HTML code.
Nov 15, 2007 09:32 AM|sdeliasr|LINK
Thank you a thousand times over.
The problem was in my understanding of how this works.
I INCORRECTLY thought that I needed to add the file extensions of the files BEING INCLUDED into Applications Mapping screen of IIS (under Home Directory -> Configuration).
So I added ".shtml" when I should have added ".html" to the mappings to ssinc.dll.
Works for me now!!!