Reputation: 61
We have a Windows 2008 web server running IIS7 and cannot seem to get ServerSideIncludes to work despite following all the instructions we could find. Here are the steps we have completed:
Added this code to web.config file to be sure SSIs were enabled:
<location path="/webs/[ourwebname]">
<system.webServer>
<serverSideInclude ssiExecDisable="false" />
</system.webServer>
</location>
Added this line of code to my default.html file to serve included content:
<!-- #include file = "/inc/myfile.html" -->
When I upload default.html to our server and view it in a browser the file displays but the included content does not appear. When I look at the source code for that page it shows my code above as an HTML comment and is not executing the code?
Also, if I change the extension to .shtml and upload that file to our server and then view it in a browser I get an "Error 404 - File Not Found" error?
What am I missing or doing wrong?
Upvotes: 3
Views: 9036
Reputation: 298
if you follow this to the letter, it will work.
worked on the very first try for me.
from your steps above sounds like you skipped one step:
Select "ServerSideIncludeModule" from the Module drop down list
Request Path: *.html
Module: ServerSideIncludeModule
Executable: blank
Name: SSI-html
Upvotes: 4