billmiller
billmiller

Reputation: 191

Cannot enable server side includes in IIS5

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.

Upvotes: 3

Views: 716

Answers (1)

KP.
KP.

Reputation: 13720

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..

Upvotes: 4

Related Questions