online design & development resource - oDDsource.com
 

Using SSI (server side includes)

By using SSI you are able to make site-wide changes by simply changing your include file.

How?

Here is an explaination of what these different methods are, and how to implement them.

Three different methods of using SSI - standard, PHP, and ASP
Using Standard SSI (.shtml or .shtm):

Cut the lines out of your html file that make up what will be used as an "include", and paste them into a new file. The new file should be comprised of only of the cut and pasted code; delete any extras in the new document that your html editor might automatically add like body or head tags.

Let's say you cut out all the navigation code and made a new file containing this information. Name the new file something like: "nav.htm"

In your original HTML file place this line were the original navigation code once appeared:

<!--#include virtual="/nav.htm" -->

Make sure the "nav.htm" actually points to were your include file is located. The above example would signify that "nav.htm" is in the root directory of your site. If you place your include files in a different location on your server, make sure you change the above code appropriatly.


*To use this form of SSI, you will need to name or rename your pages using SSI to .shtml or .shtm. IE: index.shtml, about.shtm, etc... Your actual include files can be named .htm, .html, .txt, .inc, etc...*

Using PHP Includes:

Follow the same steps as above, except that this is what will replace the lines of code that make up the include:

< ?php
include ("/nav.htm");
?>

*To use PHP includes, you will need to name or rename your pages to .php. IE: index.php, about.php, etc... Your include files can be named .htm, html, .php IE: "nav.htm"*

Using ASP Includes:

Same as in previous examples, except this is your replacement for the new included file:

<!--#include file="/nav.asp" -->

Or if the file os in another directory:

<!--#include virtual="/folder/nav.asp" -->

*To use ASP includes, you will need to name or rename your pages to .asp. IE: index.asp, about.asp, etc... Your include files can be named .htm, html, .asp, .txt... IE: "nav.htm"*


**Before diving into the world of SSI, contact your host and make sure they are available on your server.**

Back to Web Development Home

return to top


Web & Graphic Design:

  Design Articles & Tutorials
  Design Books
  Design Software
  Free Web Graphics

Development & Scripts:

  Dev Articles & Resources
  Development Books

E-commerce & Marketing:
  E-commerce Articles & Info
  E-commerce Books

Search Engine Optimization
  SEO Information

Website Directory:
  Custom Website Design
  Domain Name Registrars
  SEO Tools
  Website Directories
  Website Tutorials

More:
  Home
  Contact us

Partner Links:
  Add a Link
  RSS Feeds
  Partner Directory

 

Copyright © 2005 georgeMedia, All Rights Reserved.