Worse yet, I didn’t know exactly what I wanted, so I had a choice – tinker and tinker until I was happy, or incrementally upgrade, see what works, and end up updating pages like crazy.
In the end, I broke down and looked into Server Side Includes (SSI). Although SSI can be used for a variety of uses, I just wanted text included: create common elements of my site (title, navigation bar, bottom copyright), put them in a separate file, and thereby make updating much easier.
For instance, I could put my page banner along the top into a seperate file, and then for every web page simply include the file with this command:
<!--#include file="ssi_hdr.txt"-->
The end result is the server ‘pours’ this page into the other, and the end user sees the merged pages – including the new banner code.
And I get the benefit of having one page on my site with the banner code – so I only have a single page to change when I want a redesign.
But one big problem – you normally have to rename your files to the ‘.shtml’ extension, and we all know what renaming web pages does for search engines.
My solution? A great write up on SSI explained common options. For retrofitting, you have two ways of doing it, by adding section to your .htaccess file:
AddType text/html .html
AddHandler server-parsed .html
AddType text/html .htm
AddHandler server-parsed .htmXBitHack on
…or…
XBitHack on
With the first option, all your web pages will be checked, with the second, only pages that have their execute bit set will be checked for code.
Why the two options? Well, the power of SSI comes with a price – increased processing time. If you need it on only one or two pages, having all web pages checked for SSI commands is a timewaster.
On the other handle, always remembering to set the execute bit can be annoying, especially if all the pages on your site use SSI.
But, restricting SSI is a good thing – as a security issue, if you allow SSI across your site, you have to be very careful that user input is never displayed raw (such as in a comment or a guestbook). Otherwise, a user could enter the SSI commands, and the web page would execute them when displayed – with predictably bad results.
Using either option, you can combine the ease of maintenance with SSI, and keep that old site in the search engines. And reduce your workload to boot.






