I still don't know why it stopped working, but I can tell you how to fix it if it happens to you (and the same would apply if you had a new install and SSI were not working properly).
First, check the basics that Apache is setup to process SSIs.
- In your Apache configuration file httpd.conf make sure that the options are set to allow includes for the directory. There should be an entry in the section for options - mine reads “Options Includes Indexes FollowSymLinks MultiViews.” The important bit is the word “Includes” as this tells Apache that it can process includes for files in this directory. Note that you should not have a “+” before the word Includes.
- You should also probably add “index.shtml” to the “DirectoryIndex” line.
Now, from everything I've read, you should just uncomment out the lines “#AddType text/html .shtml” and “#AddOutputFilter INCLUDES .shtml” by removing the “#” symbol. It seems, however, that you need to do a little more than this. These lines seem to be used to create a mime type for the files processed through the include. It appears that you need to also create a handler for these files in order for the file to be handled. This is fairly straight forward as you just add the line “AddHandler server-parsed .shtml” and you have a handler. After making this entry I noticed that some of the pages started working. OK - progress. So I randomly wondered what would happen if I created mime types and handlers for the files that were being processed through the includes. I started with .inc files (these are just plain html files that I have in a library for repeatable objects - like the page header, menu and page footer).
It worked! There were still other pages that were hanging, so I went ahead and created entries for all of the file types that I'm using (except PHP as these are processed by PHP) and it works fine now. The entries I have are as follows:
AddType text/javascript .js
AddHandler server-parsed .js
AddType image/jpeg .jpg
AddHandler server-parsed .jpg
AddType image/gif .gif
AddHandler server-parsed .gif
AddType image/png .png
AddHandler server-parsed .png
AddType text/html .shtml .html .inc
AddHandler server-parsed .shtml .html .inc
AddOutputFilter INCLUDES .shtml
23rd November 2007