Server Side Include
  1. Introduction

  2. What is SSI?

  3. Using SSI

  4. SSI Commands

  5. Additional SSI Variables

  6. SSI Sample Commands

  7. Enabling SSI

  8. REFERENCES


Enabling SSI

Configure apache - /usr/local/apache/conf/httpd.conf To permit SSI on your server, you must have the following directive either in your httpd.conf file, or in a .htaccess file:

Options +Includes

This tells Apache that you want to permit files to be parsed for SSI directives.

Not any file is parsed for SSI directives. The files to be parsed must be identified to the Apache. To do this, give the command to the Apache to parse any file with a particular file extension, such as .SHTML, with the following directiv es:

AddType text/html .SHTML
AddHandler server-parsed .SHTML

One disadvantage to this approach is that in adding SSI directives to an existing page, this will require a change the name of that page, and all links to that page, in order to give it a .SHTML extension, so that those directives would be executed.

To test if the SSI is working include this line on the html page:

<!--#config timefmt="%A %B %d, %Y" -->
Today is <!--#echo var="DATE_LOCAL" -->

then make sure the HTML is now has .SHTML extension and have an executable permission.

BACK TO TOP

PREVNEXT

BACK
BACK


 
©Copyright 2003 - WebFreebie.com free web hosting and domain registration