« ASU picked as #2 seed | Main | AT&T Cingular fun continues »

Monday - November 21, 2005

Server Side Includes

This weekend, I was playing around with SSI on my website. SSI allows you to dynamically insert pages, or even CGI scripts into a regular webpage. For a better explanation, check wikipedia. Below is the 'easy' guide for getting SSI to work with Movable Type.

1) Verify your provider supports SSI. Create a file (test.shtml) and paste in the following code. (notice the .shtml extension)

<html>
<head>
<title>SSI Test</title>
</head>

<body>
<!--#echo var="DATE_LOCAL" -->
</body>
</html>

You can see the results of the output here.

2) Assuming the test worked, you now need to change Movable Type's template settings to save files as .shtml. In this example, I'm changing the main index file.

3) Change any other templates as needed and rebuild your site.
4) Manually delete the old .html files from your site (this is not totally necessary, but makes your directories less cluttered)
5) Finally, if Apache does not recognize index.shtml as a start page automatically, you can edit httpd.conf, or add the following to the site's .htaccess file "DirectoryIndex index.shtml index.html index.htm"

Now that you have MT using SSI, check around for some common uses such as here and here.

Posted by jcraven at November 21, 2005 11:11 AM