Enable SSI to include an HTML file

What do I need to do to for IIS 6 to include a regular HTML file?

<!--#include virtual="/investments/value/funds.html" -->

Any help is greatly appreciated.

Thanks.
Tom
tmmsdn [ Di, 01 November 2005 16:28 ] [ ID #1039169 ]

Re: Enable SSI to include an HTML file

tmmsdn wrote:
> What do I need to do to for IIS 6 to include a regular HTML file?
>
> <!--#include virtual="/investments/value/funds.html" -->
>
> Any help is greatly appreciated.

Enable Server Side Includes in Web Service Extensions in IIS Manager. And
make sure the pages to use SSI have the .shtml extension.

I think that's all there is to it.

Andrew
Andrew Morton [ Di, 01 November 2005 17:05 ] [ ID #1039180 ]

Re: Enable SSI to include an HTML file

Do I have to ername my include files from .html to .shtml? Can it be done
without renaming files and modifying code? I'm converting from an iPlanet
web server to IIS, and I have many .html include files on every page.

Thanks.


"Andrew Morton" wrote:

> tmmsdn wrote:
> > What do I need to do to for IIS 6 to include a regular HTML file?
> >
> > <!--#include virtual="/investments/value/funds.html" -->
> >
> > Any help is greatly appreciated.
>
> Enable Server Side Includes in Web Service Extensions in IIS Manager. And
> make sure the pages to use SSI have the .shtml extension.
>
> I think that's all there is to it.
>
> Andrew
>
>
>
tmmsdn [ Di, 01 November 2005 21:29 ] [ ID #1039199 ]

Re: Enable SSI to include an HTML file

You don't have to rename extensions, but you do need to understand the
choices and consequences.

This is how request processing works on IIS:
http://blogs.msdn.com/david.wang/archive/2005/10/14/HOWTO_II S_6_Request_Processing_Basics_Part_1.aspx

This is how you want to think about ServerSide Includes:
1. IIS only supports sending back a resource as-is, no processing (i.e.
static file handling)
2. Or execute some server-side code to process resources to send back a
response (i.e. dynamic file handling)
http://blogs.msdn.com/david.wang/archive/2005/07/11/Allow_fi le_downloads_on_IIS_6.aspx

Thus, ServerSideInclude means that IIS must choose path #2 -- because path
#1 would send the .html back as-is, <!--#include
virtual="/investments/value/funds.html" --> is not processed.

IIS provides SSI.DLL to perform #2 for ServerSideInclude functionality. This
is configured via Application Mappings, which define which server-side code
processes which request extensions.

By default, .shtm and .shtml extensions are mapped to SSI.DLL to provide
ServerSideInclude functionality for files with those extensions. But, you
can certainly add more Application Mappings such that .htm and .html
extensions are also mapped to SSI.DLL to provide ServerSideInclude
functionality for your .HTML file.

Just realize that by doing this, you are no longer treating .html as static
files (which have performance/caching optimizations) but as dynamic files
(which have less optimizations and efficiencies). Consequences of this
include:
- static/application compression (you now need to manually choose
application compression and enable it for the .htm extension, instead of
just enabling static compression)
- IIS6 kernel response cache for static files are no longer applicable to
these resources even though they are still basically static.
http://blogs.msdn.com/david.wang/archive/2005/07/07/HOWTO_Us e_Kernel_Response_Cache_with_IIS_6.aspx

I have many other blog entries about various aspects of this; feel free to
browse/search (I find the blog's built-in search to be weak and out of date,
so use a search engine).

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"tmmsdn" <tmmsdn [at] discussions.microsoft.com> wrote in message
news:EB2B02FD-7D03-46C5-8118-74B87EDAC012 [at] microsoft.com...
Do I have to ername my include files from .html to .shtml? Can it be done
without renaming files and modifying code? I'm converting from an iPlanet
web server to IIS, and I have many .html include files on every page.

Thanks.


"Andrew Morton" wrote:

> tmmsdn wrote:
> > What do I need to do to for IIS 6 to include a regular HTML file?
> >
> > <!--#include virtual="/investments/value/funds.html" -->
> >
> > Any help is greatly appreciated.
>
> Enable Server Side Includes in Web Service Extensions in IIS Manager. And
> make sure the pages to use SSI have the .shtml extension.
>
> I think that's all there is to it.
>
> Andrew
>
>
>
someone [ Mi, 02 November 2005 04:43 ] [ ID #1040797 ]
Webserver » microsoft.public.inetserver.iis » Enable SSI to include an HTML file

Vorheriges Thema: Cannot Login to IIS Server from internet...
Nächstes Thema: No CSS after linked style sheet saved