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:
- Open IIS admin on your local machine
- Expand the local computer tree in the left pane (where it says COMPUTERNAME (local computer)
- Under
Web Service Extensions
node, clickServer Side Includes
in the right window pane. - 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
2010-02-12 20:59:46
Is this also going to set SSI for .html files as opposed to just .stm?
Pekka
2010-02-12 21:02:37