If you are testing your HTML files with SSI calls on a Windows server, you will need to set options to allow SSI to be interpreted on the server side. The following are the steps I took to set up SSI in IIS on my computer running Windows 7 Home Premium.
From the Start menu, click on Control Panel. (In Windows 10, type control panel
in the search box to find it.) Click on Programs. Under Programs and Features, click on Turn Windows features on or off.
In Windows Features, expand Internet Information Services. Expand World Wide Web Services. Expand Application Development Features. Check the Server-Side Includes box. Then click OK at the bottom of the window.
Then you need to go into the IIS manager. Go to the Control Panel. Click on System and Security. Click on Administrative Tools. Double-click on Internet Information Services (IIS) Manager to run it.
In the IIS Manager, double-click on Handler Mappings.
In the Actions pane, click on Add Module Mapping… Fill in as follows:
Request path: *.html
Module: ServerSideIncludeModule
Name: SSI-html
Click OK at the bottom of the window.
Now your HTML with the SSI include directive should work.
References:
http://tech.mikeal.com/blog1.php/server-side-includes-for-html-in-iis7
http://en.wikipedia.org/wiki/Server_Side_Includes
One Response to Turning on SSI in IIS on a Windows Server