View Complete Thread
  • Re: IIS 10.0 on Windows 10 - beginner needs enable "server side includes" (simple)

    Nov 13, 2019 08:51 AM|Jalpa Panchal|LINK



    QUESTION 1: What are the steps needed to enable this capability in the environment I am using?

    Server Side Includes (SSI) is an optional feature of the web servers helping the developers to include HTML file content from a base file into multiple other HTML files with a single line of code.

    to configure SSI in iis you could follow the below steps:

    1)enable SSI feature in iis.

    open control panel->Programs and Features' > 'Turn Windows features on or off'. Find the IIS group and check 'CGI' and 'Server-Side Includes'.

    2)To enable SSI for the .htm and .html files open 'IIS Manager', select your site, and open 'Handler Mappings' feature and create module mapping entries for .htm and .html, optionally restricting availability for only 'File or folder' requests:

    3)create file e.g menu.ssi

    <ul class="menu">
        <li><a id="miHome" href="Default.html"> Home</a></li>
        <li><a id="miPage1" href="page1.html"> Page 1</a></li>
        <li><a id="miPage2" href="page2.html"> Page 2</a></li>
        <li><a id="miPage3" href="page3.html"> Page 3</a></li>

    Call the .ssi content from within your other HTML files using one of the following options, depending on how your menu.ssi file is deployed on the server:

      <!-- ... -->
      <!--#include virtual="/includes/menu.ssi" -->
      <!-- or -->
      <!--#include file="menu.ssi" -->
      <!-- ... -->


    QUESTION 2: Can my html files remain extension .html, or must they change to .asp or something else? I

    in my opinion your extension will not change.

    you could refer some below link for more detail:

    IIS Server-Side Include Directives

    IIS: Notes on Server-Side Includes (SSI) Syntax (KB 203064 Revisited)

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact