Server Side Includes

SSI lets users embed a number of special 'commands' into the HTML file. When the server reads an SSI document, it looks for these commands and performs the necesary action. For example, there is an SSI command which inserts the document's last modification time.

For more information check the Apatche Server Side Includes Documentation.

How to use SSI commands on your home page

To use SSI you need to use a special file extension shtml instead of the html or htm. For example, using index.shtml instead of index.html.

Examples:

Echo Directive
<!--#echo var="DOCUMENT_NAME" -->
ssi.shtml
<!--#echo var="DOCUMENT_URI" -->
/CRC/documentation/ssi.shtml
<!--#echo var="DATE_LOCAL" -->
Thursday, 02-May-2024 20:50:00 PDT
<!--#echo var="DATE_GMT" -->
Friday, 03-May-2024 03:50:00 GMT
<!--#echo var="LAST_MODIFIED" -->
Monday, 21-Mar-2005 09:40:51 PST
File Size / Modified
<!--#fsize file="ssi.shtml" -->
1.5K
<!--#flastmod file="ssi.shtml" -->
[an error occurred while processing this directive]