Server Side Includes

While standard HTML files are fine for storing pages, it is very useful to be able to create some content dynamically. For example, to add a footer or header to all files, or to insert document information such as last modified times automatically. This can be done with CGI, but that can be complex and requires programming or scripting skills. For simple dynamic documents there is an alternative: Server Side Includes (SSI).

SSI lets you embed a number of special commands into the HTML itself. When the server reads a SSI document, it looks for these commands and performs the necessary action. For example, there is an SSI command which inserts the document's last modification time. When the server reads a file with this command in it, it removes the old time and inserts the appropriate time.

There are a number of other neat tricks that can be done using Server Side Includes. One example of this is an access counter. With a little bit of programming (sorry, no ready-made solution is available at this time) you should be able to keep track of where requests are coming from.

Note:  In the past, files using the .html file extension were acceptable for web pages using SSI. This is no longer the case. The filename MUST end in .shtml in order to use server side includes.

Here are a few links that are excellent SSI resources: