XSSI
Apache also supports XSSI (eXtended Server Side Includes), which provides more advanced command functions (and, consequently, uses code that is a bit more complicated for non-programmer types).
This section presents a brief overview of features unique to XSSI.
For the nitty-gritty how-to information, see the Apache 1.3
mod_include documentation at http://www.apache.org/docs/mod/mod_include.html.
There are several good articles on XSSI available on the Webmonkey
site (http://hotwired.lycos.com/webmonkey/backend/apache_xssi/index.html),
which provide good explanations and examples of real-world
implementations of XSSI. Despite being several years old, the
information is still valid.
Flow Control Elements
Flow control elements are a set of if/else commands (similar to if statements used in a programming language) that allow authors to create conditional commands. Using flow control elements, authors can make documents display differently based on specific variables (the “test conditions”). For instance, you could publish one version of your page for users accessing it with the Navigator browser and another for Internet Explorer users.
The basic flow elements are:
<!--#if expr="test_condition" --> <!--#elif expr="test_condition" --> <!--#else --> <!--#endif -->
The first command contains the
if
statement that causes the server to test for a condition (e.g., if the browser is Navigator). If it is found to be true, the server prints the text or executes any SSI commands immediately ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access