Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can't get IIS to respect my SSI directives - it just outputs the #include directive as if it were regular old html.

Here's the relevant data points:

  • My file with the include directive is called index.html
  • This is my directive: <!-- #include file = "header.shtml" --> (it doesn't work with virtual either.)
  • The file being requested is in the same directory as the file being #include-ed.
  • The SSI module is installed.
  • The SSINC-shtml handler mapping is present and enabled.

I think it might be some sort of permissions issue (read/write/execute), but I don't know where those settings are in IIS 7.5.

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

The problem is that the file is called index.html, which is not mapped to the SSI handler by default. Either:

  1. Map the .html file extension to the SSI handler which brings up another question OR
  2. Rename the file index.shtml
share|improve this answer
add comment

In IIS Mgr, click on the Server / site node (whichever level is appropriate for your environment) and click Handler Mappings. Double-click on the SSINC-shtml mapping, the click the Request Restrictions... button. Check the settings in all 3 tabs there and see if you've got something set improperly.

share|improve this answer
    
Can you elaborate on "improperly"? I saw that it has script access. –  Josh Kodroff Mar 15 '11 at 14:06
add comment

Server-Side Includes are not enabled by Default in IIS 7 on Windows 7.

In Control Panel, Programs, Turn Windows features on off:

Check the option:

  Internet Information Services
    Application Development Features
      [x] Server-Side Includes
share|improve this answer
    
-1 for not reading that I have already installed the SSI module. –  Josh Kodroff Mar 7 '11 at 21:53
    
Did you also enable Common HTTP Features \ Static Content? –  Gordon Bell Mar 7 '11 at 22:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.