Title Graphic
Google

WestHost Web Hosting

TWFW

The Writers Store

The Writer Magazine

Write 4 Kids link

iUniverse, Inc.

Kodak EasyShare Gallery

Kodak Store

Clipart.com

www.DickBlick.com - Online Art Supplies

To receive a copy of this article to use on your website or in your newsletter just send me an e-mail at
Put "Article Request: SSI
" in the subject line.

WestHost Web Hosting

Use Server Side Includes To Ease Your Workload

by
Jeff Colburn

I'm all for making things as easy as possible. The whole idea in business, and life, is to work smarter not harder. When designing websites, I not only want to create them with as little effort as possible, but I also want to make maintaining them easy.

One way to do this is with Server Side Includes (SSI). SSI's are an easy way to add or update content to one or more web pages on a site. One way I use SSI's is for the copyright on my pages. By changing the year in one file, it changes the year on all of my pages. I also use SSI's for the links on my pages. If I decide to add or remove a link, or rearrange them, I simply make the changes in one file and my entire site is automatically updated. As I said before, make it easy. Why should I go to each of the 80 plus pages on my site to change something when I can do the same thing with one little file?

Another great thing about SSI's is that you can't see them on a web page. If you, or anyone, view the contents of your page, the SSI won't show. Instead, you will only see the HTML put there by the SSI.

Before you try to use SSI's you need to check with your web host to see if the server is set up for them. Most servers are. If they say they are, then you need to do a little test. Create a web page with the following HTML.

<HTML>
<TITLE>Testing SSI</TITLE>
<!--#config timefmt="%A" -->
<!--#echo var="DATE_LOCAL" -->
</HTML>

Save this as an HTML file and upload it to your server. Now try to open the page with your browser. If you see the current weekday, like Monday, Tuesday, etc. then you can start using SSI's. If you don't see anything, rename the file extension. Instead of using HTML use SHTML. Some servers require the "S" and others don't.

Another thing you need to know is that you shouldn't use the SHTML extension on your Home or Index page. Spiders don't like it and won't be able to Index the page on their search engines.

Now that you know your server will let you use SSI's, let's start saving time. The first thing you need to do is create a text (.TXT) file that contains the information you want to include. This can be graphics, text, links or anything else you want to include. You will want to include the HTML that you would normally put on a web page. Think of this text file as something that will be pasted into your web page, since this is exactly what will happen.

If you wanted to include a copyright on each page, then put this into the text file

<p align="center">Copyright (c) 2004 Jeff Colburn</p>

and save it as a text file. Let's call it copyright.txt.

Now, create the web page where you want the copyright to go. In the place where you want to see the copyright, put

<!--#include virtual="copyright.txt"-->

then upload this web page to your server. When you go to this page with your browser, you will see the copyright information where you want it.

If the copyright doesn't show up, recheck the above command. Be sure the spacing and capitalization are correct.

I usually put these text files in my main folder with all the SHTML files. Another option is to put all of the SSI text files into their own folder. If you do that, then the command will look like this

<!--#include virtual="/directory/copyright.txt"-->

Replace the word "directory" with the name of the directory where your text files are located.

Now you can use SSI's to include anything you want on various pages. And feel free to include as many SSI's on a web page as you want. I use up to five on some of my pages. The real secret is to carefully plan out your site and its future growth. This way you can include SSI's as you create your site, instead of adding them to your site after it's completed.

So have fun with SSI's, be creative and let your server do as much of your work as possible.



Do you want to learn how to make your website work for you and not against you? Then visit The Creative Cauldron NOW to find the answers to your questions, and achieve what you want in life. Go to www.TenCommonWebMistakes.com to download the FREE report "Ten Common Mistakes Found On Websites, And How To Fix Them."

link to home
link to resources
link to affiliates
link to events
link to retreats
link to my blog
link to articles
link to dead publications
link to library
link to links
link to about jeff

Sign up for the free weekly Creative Quotes newsletter and receive two FREE reports.

eMail address:
First Name:
 

Bar Graphic

Home    Resources    Be An Affiliate  Events   
Retreats    Blog    Articles    Dead    Library    Links    About Jeff   

Dragon's Lair Productions®
www.CreativeCauldron.com
All Rights Reserved

Copyright © 1999 - 2008 Jeff Colburn