Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 68710 invoked by uid 500); 6 Nov 2000 02:45:59 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 68641 invoked by uid 500); 6 Nov 2000 02:45:58 -0000 Delivered-To: apmail-apache-1.3-cvs@apache.org Delivered-To: apmail-httpd-docs-1.3-cvs@apache.org Date: 6 Nov 2000 02:45:58 -0000 Message-ID: <20001106024558.68575.qmail@locus.apache.org> From: rbowen@locus.apache.org To: httpd-docs-1.3-cvs@apache.org Subject: cvs commit: httpd-docs-1.3/htdocs/manual/howto SSI-HOWTO.html rbowen 00/11/05 18:45:57 Modified: htdocs/manual/howto SSI-HOWTO.html Log: Numerous grammatical and style corrections, thanks to Chris Pepper. Revision Changes Path 1.3 +9 -9 httpd-docs-1.3/htdocs/manual/howto/SSI-HOWTO.html Index: SSI-HOWTO.html =================================================================== RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/howto/SSI-HOWTO.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SSI-HOWTO.html 2000/11/05 20:37:10 1.2 +++ SSI-HOWTO.html 2000/11/06 02:45:57 1.3 @@ -74,8 +74,8 @@ usually called simply SSI. In this article, I'll talk about configuring your server to permit SSI, and introduce some basic SSI techniques for adding dynamic content to your existing HTML pages.

-

In the latter part of article, we'll talk about some of the somewhat -more advanced things can be done with SSI, such as conditional statements +

In the latter part of the article, we'll talk about some of the somewhat +more advanced things that can be done with SSI, such as conditional statements in your SSI directives.


@@ -138,7 +138,7 @@

It is formatted like an HTML comment, so if you don't have SSI correctly enabled, the browser will ignore it, but it will still be visible in the HTML source. If you have SSI correctly configured, the directive will be replaced with -the results of the directive.

+its results.

The element can be one of a number of things, and we'll talk some more about most of these in the next installment of this series. For now, here are some examples of what you can do with SSI

@@ -200,7 +200,7 @@

Using an include file for a header and/or a footer can reduce the burden of these updates. You just have to make one footer file, and then include it into each page with the include SSI command. The include element can determine what file -to include with either the file attribute, or the vitrual attribute. The file +to include with either the file attribute, or the virtual attribute. The file attribute is a file path, relative to the current directory. That means that it cannot be an absolute file path (starting with /), nor can it contain ../ as part of that path. The virtual attribute is probably more useful, and should @@ -236,7 +236,7 @@ SSI with small CGI programs. For now, here's something else that you can do with the exec element. You can actually have SSI execute a command using the shell (/bin/sh, to be precise - or the DOS shell, if you're on Win32). -The following, for example will give you a directory listing.

+The following, for example, will give you a directory listing.

           <pre>
           <!--#exec cmd="ls" -->
  @@ -269,7 +269,7 @@
   

Setting variables

Using the set attribute, you can set variables for later use. We'll need this -later in the discussion, so we'll talk about this here. The syntax of this is +later in the discussion, so we'll talk about it here. The syntax of this is as follows:

           <!--#set var="name" value="Rich" -->
@@ -296,7 +296,7 @@

Conditional expressions

Now that we have variables, and are able to set and compare their values, we -can use them to express conditionals. This lets SSI be a tiny programming languages +can use them to express conditionals. This lets SSI be a tiny programming language of sorts. mod_include provides an if, elif, else, endif structure for building conditional statements. This allows you to effectively generate multiple logical pages out of one actual page.

@@ -327,7 +327,7 @@

Not that I have anything against IE on Macs - I just struggled for a few hours last week trying to get some JavaScript working on IE on a Mac, when it was working everywhere else. The above was the interim workaround.

-

Any other variable (either ones that you define, or normal enviroment variables) +

Any other variable (either ones that you define, or normal environment variables) can be used in conditional statements. With Apache's ability to set environment variables with the SetEnvIf directives, and other related directives, this functionality can let you do some pretty involved dynamic stuff without ever @@ -336,7 +336,7 @@


Conclusion

SSI is certainly not a replacement for CGI, or other technologies used for -generating dynamic web pages. But it is certainly a great way to add small +generating dynamic web pages. But it is a great way to add small amounts of dynamic content to pages, without doing a lot of extra work.