views:

122

answers:

1

I am trying to enable server side includes in some plain html files. I need help enabling ssi via IIS on the localhost. I am running XP Pro, and using both ie8 and firefox to test the files. Thanks for your help.

+2  A: 

Here is how to do it:

  1. Open IIS admin on your local machine
  2. Expand the local computer tree in the left pane (where it says COMPUTERNAME (local computer)
  3. Under Web Service Extensions node, click Server Side Includes in the right window pane.
  4. Right-click and select Allow.

There you go.

EDIT:

If you want to map a non-default (.shtml/.shtm) extension to SSI, you'll have to add it to your default site. You can do this by:

Right click your website in IIS, select Properties

Click the Home tab

Click the Configuration... button

Under the Mappings tab, click the Add button

The fields should be:

  • Executable: - C:\WINDOWS\system32\inetsrv\ssinc.dll
  • Extension: .whatever
  • Verbs: Limit to GET,POST
  • Script engine: checked
  • Verify the file exists: checked

You'll have to try it out with .html files.. I'm not sure the consequences of mapping standard HTML files to work with SSI. I would think you're going to negatively impact performance as now IIS will treat all .html files as dynamic even when you aren't including them? Worth trying though I guess. An alternate solution would be to use the traditional .shtml/.shtm extensions..

KP
Is this also going to set SSI for .html files as opposed to just .stm?
Pekka