From: Eric Covener
Date: Fri, 22 Aug 2014 20:31:28 +0000 (+0000)
Subject: Revert r1602714 per http://httpd.apache.org/docs/2.2/howto/ssi.html#comment_2915
X-Git-Tag: 2.2.30~238
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a994a41143fd78a901fe879f8d6984e4588846c;p=thirdparty%2Fapache%2Fhttpd.git
Revert r1602714 per http://httpd.apache.org/docs/2.2/howto/ssi.html#comment_2915
which included 2.4/ap_expr info and examples.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1619923 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/howto/ssi.xml b/docs/manual/howto/ssi.xml
index 969d64da90a..0416d8d2989 100644
--- a/docs/manual/howto/ssi.xml
+++ b/docs/manual/howto/ssi.xml
@@ -431,30 +431,41 @@ modified?
the ``truth'' of a particular value. (A given string is true if
it is nonempty.) For a full list of the comparison operators
available to you, see the mod_include
- documentation.
-
- For example, if you wish to customize the text on your web page
- based on the time of day, you could use the following recipe, placed
- in the HTML page:
-
-
- Good
- <!--#if expr="%{TIME_HOUR} >=12" -->
- morning!
- <!--#else -->
- afternoon!
- <!--#endif -->
-
+ documentation. Here are some examples of how one might use this
+ construct.
+
+ In your configuration file, you could put the following
+ line:
+
+ BrowserMatchNoCase macintosh Mac
+ BrowserMatchNoCase MSIE InternetExplorer
+
+
+ This will set environment variables ``Mac'' and
+ ``InternetExplorer'' to true, if the client is running Internet
+ Explorer on a Macintosh.
+
+ Then, in your SSI-enabled document, you might do the
+ following:
+
+ <!--#if expr="${Mac} && ${InternetExplorer}" -->
+ Apologetic text goes here
+ <!--#else -->
+ Cool JavaScript code goes here
+ <!--#endif -->
+
+
+ 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
environment variables) can be used in conditional statements.
- See Expressions in Apache HTTP Server for
- more information on the expression evaluation engine.
-
- With Apache's ability to set environment variables with the
+ With Apache's ability to set environment variables with the
SetEnvIf
directives, and other related directives,
- this functionality can let you do a wide variety of dynamic content
- on the server side without resorting a full web application.
+ this functionality can let you do some pretty involved dynamic
+ stuff without ever resorting to CGI.