summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_include.html
blob: d307646288ad1df479e7188b116c4d1e2f6a86ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
<html xmlns="http://www.w3.org/TR/xhtml1/strict"><head><!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
--><title>mod_include - Apache HTTP Server</title><link href="../style/manual.css" type="text/css" rel="stylesheet"/></head><body><blockquote><div align="center"><img alt="[APACHE DOCUMENTATION]" src="../images/sub.gif"/><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module mod_include</h1><table cellspacing="1" cellpadding="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td valign="top"><span class="help">Description:</span></td><td>Server-parsed html documents (Server Side Includes)</td></tr><tr><td><a href="module-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="module-dict.html#ModuleIdentifier" class="help">Module&nbsp;Identifier:</a></td><td>include_module</td></tr></table></td></tr></table><h2>Summary</h2>

    <p>This module provides a filter which will process files
    before they are sent to the client. The processing is
    controlled by specially formated SGML comments, referred to as
    <em>elements</em>. These elements allow conditional text, the
    inclusion other files or programs, as well as the setting and
    printing of environment variables.</p>

<h2>Directives</h2><ul><li><a href="#ssiendtag">SSIEndTag</a></li><li><a href="#ssierrormsg">SSIErrorMsg</a></li><li><a href="#ssistarttag">SSIStartTag</a></li><li><a href="#ssitimeformat">SSITimeFormat</a></li><li><a href="#ssiundefinedecho">SSIUndefinedEcho</a></li><li><a href="#xbithack">XBitHack</a></li></ul><p><strong>See also </strong></p><ul><li><a href="core.html#options" class="directive"><code class="directive">Options</code></a></li><li><a href="core.html#setoutputfilter" class="directive"><code class="directive">SetOutputFilter</code></a></li><li><a href="core.html#acceptpathinfo" class="directive"><code class="directive">AcceptPathInfo</code></a></li></ul><h2><a name="enabling">Enabling Server-Side Includes</a></h2>
    

    <p>Server Side Includes are implemented by the
    <code>INCLUDES</code> <a href="../filter.html">filter</a>. If
    documents containing server-side include directives are given
    the extension .shtml, the following directives will make Apache
    parse them and assign the resulting document the mime type of
    <code>text/html</code>:</p>

    <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
      AddType text/html .shtml<br>
      AddOutputFilter INCLUDES .shtml
    </code></td></tr></table></blockquote>

    <p>The following directive must be given for the directories
    containing the shtml files (typically in a
    <code>&lt;Directory&gt;</code> section, but this directive is
    also valid .htaccess files if <code>AllowOverride
    Options</code> is set):</p>

    <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
      Options +Includes
    </code></td></tr></table></blockquote>

    <p>For backwards compatibility, the <code>server-parsed</code>
    <a href="../handler.html">handler</a> also activates the
    INCLUDES filter. As well, Apache will activate the INCLUDES
    filter for any document with mime type
    <code>text/x-server-parsed-html</code> or
    <code>text/x-server-parsed-html3</code> (and the resulting
    output will have the mime type <code>text/html</code>).</p>

    <p>For more information, see our <a href="../howto/ssi.html">Tutorial on Server Side
    Includes</a>.</p>
<h2><a name="basic">Basic Elements</a></h2>
    
    <p>The document is parsed as an HTML document, with special
    commands embedded as SGML comments. A command has the syntax: </p>

    <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
      <code>&lt;!--#</code><em>element attribute=value
      attribute=value ...</em> <code>--&gt;</code>
    </code></td></tr></table></blockquote>

    <p>The value will often be enclosed in double quotes; many
    commands only allow a single attribute-value pair. Note that
    the comment terminator (<code>--&gt;</code>) should be preceded
    by whitespace to ensure that it isn't considered part of an SSI
    token. </p>

    <p>The allowed elements are:</p>

    <dl>
      <dt><strong>config</strong></dt>

      <dd>
        This command controls various aspects of the parsing. The
        valid attributes are: 

        <dl>
          <dt><strong>errmsg</strong></dt>

          <dd>The value is a message that is sent back to the
          client if an error occurs whilst parsing the
          document.</dd>

          <dt><strong>sizefmt</strong></dt>

          <dd>The value sets the format to be used which displaying
          the size of a file. Valid values are <code>bytes</code>
          for a count in bytes, or <code>abbrev</code> for a count
          in Kb or Mb as appropriate.</dd>

          <dt><strong>timefmt</strong></dt>

          <dd>The value is a string to be used by the
          <code>strftime(3)</code> library routine when printing
          dates.</dd>
        </dl>
      </dd>

      <dt><strong><a name="echo">echo</a></strong></dt>

      <dd>
        <p>This command prints one of the <a href="#includevars">include
        variables</a>, defined below. If the variable is unset, it
        is printed as <code>(none)</code>. Any dates printed are
        subject to the currently configured <code>timefmt</code>.</p>

        <p>Attributes:</p> 

        <dl>
          <dt><strong>var</strong></dt>

          <dd>The value is the name of the variable to print.</dd>

          <dt><strong>encoding</strong></dt>

          <dd>Specifies how Apache should encode special characters
          contained in the variable before outputting them. If set
          to "none", no encoding will be done. If set to "url",
          then URL encoding (also known as %-encoding; this is
          appropriate for use within URLs in links, etc.) will be
          performed. At the start of an <code>echo</code> element,
          the default is set to "entity", resulting in entity
          encoding (which is appropriate in the context of a
          block-level HTML element, eg. a paragraph of text). This
          can be changed by adding an <code>encoding</code>
          attribute, which will remain in effect until the next
          <code>encoding</code> attribute is encountered or the
          element ends, whichever comes first. Note that the
          <code>encoding</code> attribute must <em>precede</em> the
          corresponding <code>var</code> attribute to be effective,
          and that only special characters as defined in the
          ISO-8859-1 character encoding will be encoded. This
          encoding process may not have the desired result if a
          different character encoding is in use. Apache 1.3.12 and
          above; previous versions do no encoding.</dd>
        </dl>
      </dd>

      <dt><strong>exec</strong></dt>

      <dd>
        The exec command executes a given shell command or CGI
        script. The IncludesNOEXEC <a href="core.html#option" class="directive"><code class="directive">Option</code></a> disables this command
        completely. The valid attributes are: 

        <dl>
          <dt><strong>cgi</strong></dt>

          <dd>
            The value specifies a (%-encoded) URL relative path to
            the CGI script. If the path does not begin with a (/),
            then it is taken to be relative to the current
            document. The document referenced by this path is
            invoked as a CGI script, even if the server would not
            normally recognize it as such. However, the directory
            containing the script must be enabled for CGI scripts
            (with <a href="mod_alias.html#scriptalias" class="directive"><code class="directive">ScriptAlias</code></a>
            or the ExecCGI <a href="core.html#option" class="directive"><code class="directive">Option</code></a>). 

            <p>The CGI script is given the PATH_INFO and query
            string (QUERY_STRING) of the original request from the
            client; these cannot be specified in the URL path. The
            include variables will be available to the script in
            addition to the standard <a href="mod_cgi.html">CGI</a>
            environment.</p>

            <p>For example:</p>

  <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>&lt;!--#exec cgi="/cgi-bin/example.cgi" --&gt;</code></td></tr></table></blockquote>

            <p>If the script returns a Location: header instead of
            output, then this will be translated into an HTML
            anchor.</p>

            <p>The <code><a href="#includevirtual">include
            virtual</a></code> element should be
            used in preference to <code>exec cgi</code>. In particular,
            if you need to pass additional arguments to a CGI program,
            using the query string, this cannot be done with <code>exec
            cgi</code>, but can be done with <code>include
            virtual</code>, as shown here:</p>

  <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
  &lt;!--#include virtual="/cgi-bin/example.cgi?argument=value" --&gt;
  </code></td></tr></table></blockquote>

          </dd>

          <dt><strong>cmd</strong></dt>

          <dd>
          <p>The server will execute the given string using
          <code>/bin/sh</code>. The <a href="#includevars">include variables</a> are available
          to the command, in addition to the usual set of CGI 
          variables.</p>

        <p>The use of <code><a href="#includevirtual">#include 
        virtual</a></code> is almost always
        prefered to using either <code>#exec cgi</code> or <code>#exec
        cmd</code>. The former (<code>#include virtual</code>) used the
        standard Apache sub-request mechanism to include files or
        scripts. It is much better tested and maintained.</p>

          <p>In addition, on some platforms, like Win32, and on unix
          when using suexec, you cannot pass arguments to a command in 
          an <code>exec</code> directive, or otherwise include spaces in
          the command. Thus, while the following will work under a
          non-suexec configuration on unix, it will not produce the
          desired result under Win32, or when running suexec:</p>

   <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
   &lt;!--#exec cmd="perl /path/to/perlscript arg1 arg2" --&gt;
   </code></td></tr></table></blockquote>

          </dd>
        </dl>
      </dd>

      <dt><strong>fsize</strong></dt>

      <dd>
        This command prints the size of the specified file, subject
        to the <code>sizefmt</code> format specification.
        Attributes: 

        <dl>
          <dt><strong>file</strong></dt>

          <dd>The value is a path relative to the directory
          containing the current document being parsed.</dd>

          <dt><strong>virtual</strong></dt>

          <dd>The value is a (%-encoded) URL-path relative to the
          current document being parsed. If it does not begin with
          a slash (/) then it is taken to be relative to the
          current document.</dd>
        </dl>
      </dd>

      <dt><strong>flastmod</strong></dt>

      <dd>This command prints the last modification date of the
      specified file, subject to the <code>timefmt</code> format
      specification. The attributes are the same as for the
      <code>fsize</code> command.</dd>

      <dt><strong>include</strong></dt>

      <dd>
        This command inserts the text of another document or file
        into the parsed file. Any included file is subject to the
        usual access control. If the directory containing the
        parsed file has the <a href="core.html#options">Option</a>
        IncludesNOEXEC set, and the including the document would
        cause a program to be executed, then it will not be
        included; this prevents the execution of CGI scripts.
        Otherwise CGI scripts are invoked as normal using the
        complete URL given in the command, including any query
        string. 

        <p>An attribute defines the location of the document; the
        inclusion is done for each attribute given to the include
        command. The valid attributes are:</p>

        <dl>
          <dt><strong>file</strong></dt>

          <dd>The value is a path relative to the directory
          containing the current document being parsed. It cannot
          contain <code>../</code>, nor can it be an absolute path.
          Therefore, you cannot include files that are outside of the
          document root, or above the current document in the directory
          structure.
          The <code>virtual</code> attribute should always be used
          in preference to this one.</dd>

          <dt><strong><a name="includevirtual">virtual</a></strong></dt>

         <dd>
          <p>The value is a (%-encoded) URL relative to the
          current document being parsed. The URL cannot contain a
          scheme or hostname, only a path and an optional query
          string. If it does not begin with a slash (/) then it is
          taken to be relative to the current document.</p>

          <p>A URL is constructed from the attribute, and the output the
        server would return if the URL were accessed by the client
        is included in the parsed output. Thus included files can
           be nested.</p>

           <p>If the specified URL is a CGI program, the program will
           be executed and its output inserted in place of the directive
           in the parsed file. You may include a query string in a CGI
           url:</p>
     
     <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
     &lt;!--#include virtual="/cgi-bin/example.cgi?argument=value" --&gt;
     </code></td></tr></table></blockquote>
           
           <p><code>include virtual</code> should be used in preference
           to <code>exec cgi</code> to include the output of CGI
           programs into an HTML document.</p>
          </dd>
        </dl>
      </dd>

      <dt><strong>printenv</strong></dt>

      <dd>
      <p>This prints out a listing of all existing variables and
      their values. Starting with Apache 1.3.12, special characters
      are entity encoded (see the <a href="#echo"><code>echo</code></a> element for details)
      before being output. There are no attributes.</p>

      <p>For example:</p>

      <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
      &lt;!--#printenv --&gt;
      </code></td></tr></table></blockquote>

      <p>The <strong>printenv</strong> element is available only in
      Apache 1.2 and above.</p>
    </dd>
      <dt><strong>set</strong></dt>

      <dd>
        This sets the value of a variable. Attributes: 

        <dl>
          <dt><strong>var</strong></dt>

          <dd>The name of the variable to set.</dd>

          <dt><strong>value</strong></dt>

          <dd>The value to give a variable.</dd>
        </dl>
        <p>For example:</p>
        
        <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
        &lt;!--#set var="category" value="help" --&gt;
        </code></td></tr></table></blockquote>

      <p>The <strong>set</strong> element is available only in
      Apache 1.2 and above.</p>
      </dd>
    </dl>
<h2><a name="includevars">Include Variables</a></h2>
    

    <p>In addition to the variables in the standard CGI environment,
    these are available for the <code>echo</code> command, for
    <code>if</code> and <code>elif</code>, and to any program
    invoked by the document.</p>

    <dl>
      <dt>DATE_GMT</dt>

      <dd>The current date in Greenwich Mean Time.</dd>

      <dt>DATE_LOCAL</dt>

      <dd>The current date in the local time zone.</dd>

      <dt>DOCUMENT_NAME</dt>

      <dd>The filename (excluding directories) of the document
      requested by the user.</dd>

      <dt>DOCUMENT_URI</dt>

      <dd>The (%-decoded) URL path of the document requested by the
      user. Note that in the case of nested include files, this is
      <em>not</em> then URL for the current document.</dd>

      <dt>LAST_MODIFIED</dt>

      <dd>The last modification date of the document requested by
      the user.</dd>
    </dl>
<h2>Variable Substitution</h2>
    

    <p>Variable substitution is done within quoted strings in most
    cases where they may reasonably occur as an argument to an SSI
    directive. This includes the <code>config</code>,
    <code>exec</code>, <code>flastmod</code>, <code>fsize</code>,
    <code>include</code>, and <code>set</code> directives, as well
    as the arguments to conditional operators. You can insert a
    literal dollar sign into the string using backslash
    quoting:</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
    &lt;!--#if expr="$a = \$test" --&gt;
</code></td></tr></table></blockquote>

    <p>If a variable reference needs to be substituted in the
    middle of a character sequence that might otherwise be
    considered a valid identifier in its own right, it can be
    disambiguated by enclosing the reference in braces,
    <em>a la</em> shell substitution:</p>

<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
    &lt;!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" --&gt;
</code></td></tr></table></blockquote>

    <p>This will result in the <code>Zed</code> variable being set
    to "<code>X_Y</code>" if <code>REMOTE_HOST</code> is
    "<code>X</code>" and <code>REQUEST_METHOD</code> is
    "<code>Y</code>".</p>

    <p>EXAMPLE: the below example will print "in foo" if the
    DOCUMENT_URI is /foo/file.html, "in bar" if it is
    /bar/file.html and "in neither" otherwise:</p>

<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
    &lt;!--#if expr="\"$DOCUMENT_URI\" = \"/foo/file.html\"" --&gt;<br>
    in foo<br>
    &lt;!--#elif expr="\"$DOCUMENT_URI\" = \"/bar/file.html\"" --&gt;<br>
    in bar<br>
    &lt;!--#else --&gt;<br>
    in neither<br>
    &lt;!--#endif --&gt;
</code></td></tr></table></blockquote>
<h2><a name="flowctrl">Flow Control Elements</a></h2>
    

    <p>These are available in Apache 1.2 and above. The basic flow
    control elements are:</p>

<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
    &lt;!--#if expr="<em>test_condition</em>" --&gt;<br>
    &lt;!--#elif expr="<em>test_condition</em>" --&gt;<br>
    &lt;!--#else --&gt;<br>
    &lt;!--#endif --&gt;
</code></td></tr></table></blockquote>

    <p>The <strong><code>if</code></strong> element works like an
    if statement in a programming language. The test condition is
    evaluated and if the result is true, then the text until the
    next <strong><code>elif</code></strong>,
    <strong><code>else</code></strong>. or
    <strong><code>endif</code></strong> element is included in the
    output stream.</p>

    <p>The <strong><code>elif</code></strong> or
    <strong><code>else</code></strong> statements are be used the
    put text into the output stream if the original test_condition
    was false. These elements are optional.</p>

    <p>The <strong><code>endif</code></strong> element ends the
    <strong><code>if</code></strong> element and is required.</p>

    <p><em>test_condition</em> is one of the following:</p>

    <dl>
      <dt><em>string</em></dt>

      <dd>true if <em>string</em> is not empty</dd>

      <dt><em>string1</em> = <em>string2</em><br>
       <em>string1</em> != <em>string2</em><br>
       <em>string1</em> &lt; <em>string2</em><br>
       <em>string1</em> &lt;= <em>string2</em><br>
       <em>string1</em> &gt; <em>string2</em><br>
       <em>string1</em> &gt;= <em>string2</em></dt>

      <dd>Compare string1 with string 2. If string2 has the form
      <em>/string/</em> then it is compared as a regular
      expression. Regular expressions have the same syntax as those
      found in the Unix <code>egrep</code> command.</dd>

      <dt>( <em>test_condition</em> )</dt>

      <dd>true if <em>test_condition</em> is true</dd>

      <dt>! <em>test_condition</em></dt>

      <dd>true if <em>test_condition</em> is false</dd>

      <dt><em>test_condition1</em> &amp;&amp;
      <em>test_condition2</em></dt>

      <dd>true if both <em>test_condition1</em> and
      <em>test_condition2</em> are true</dd>

      <dt><em>test_condition1</em> || <em>test_condition2</em></dt>

      <dd>true if either <em>test_condition1</em> or
      <em>test_condition2</em> is true</dd>
    </dl>

    <p>"<em>=</em>" and "<em>!=</em>" bind more tightly than
    "<em>&amp;&amp;</em>" and "<em>||</em>". "<em>!</em>" binds
    most tightly. Thus, the following are equivalent:</p>

<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
    &lt;!--#if expr="$a = test1 &amp;&amp; $b = test2" --&gt;<br>
    &lt;!--#if expr="($a = test1) &amp;&amp; ($b = test2)" --&gt;
</code></td></tr></table></blockquote>

    <p>Anything that's not recognized as a variable or an operator
    is treated as a string. Strings can also be quoted:
    <em>'string'</em>. Unquoted strings can't contain whitespace
    (blanks and tabs) because it is used to separate tokens such as
    variables. If multiple strings are found in a row, they are
    concatenated using blanks. So,</p>

<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
    <pre><em>string1    string2</em>  results in <em>string1 string2</em></pre>
    <pre><em>'string1    string2'</em> results in <em>string1    string2</em></pre>
</code></td></tr></table></blockquote>

<h2>Using Server Side Includes for ErrorDocuments</h2>
    

    <p>There is <a href="../misc/custom_errordocs.html">a document</a>
    which describes how to use the features of mod_include to offer
    internationalized customized server error documents.</p>

<h2>PATH_INFO with Server Side Includes</h2>

    <p>Files processed for server-side includes no longer accept
    requests with PATH_INFO (trailing pathname information) by
    default.  You can use the <a href="core.html#acceptpathinfo" class="directive"><code class="directive">AcceptPathInfo</code></a> directive to
    configure the server to accept requests with PATH_INFO.</p>

<hr/><h2><a name="SSIEndTag">SSIEndTag</a> <a name="ssiendtag">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Changes the string that mod_include looks for to end an
include command.</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSIEndTag <em>tag</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSIEndTag "--&gt;"</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>FileInfo</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_include</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Available in version 2.0.30 and later.
</td></tr></table></td></tr></table>
    <p>This directive changes the string that mod_include looks for 
    to mark the end of a include command.</p>

<p><strong>See also </strong></p><ul><li><code class="directive">SSIStartTag</code></li></ul><hr/><h2><a name="SSIErrorMsg">SSIErrorMsg</a> <a name="ssierrormsg">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Changes the error message displayed when there is an error</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSIErrorMsg <em>message</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSIErrorMsg 
"[an error occurred while processing this directive]"</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td/></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_include</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Available in version 2.0.30 and later.</td></tr></table></td></tr></table>
    <p>The SSIErrorMsg directive changes the error message displayed
    when mod_include encounters an error. For production servers you
    may consider changing the default error message to
    <code>"&lt;-- Error --&gt;"</code> so that the message
    is not presented to the user.
    </p>
    <p>This directive has the same effect as the <code>&lt;--#config
    errmsg=<em>message</em> --&gt;</code> element.</p>

<hr/><h2><a name="SSIStartTag">SSIStartTag</a> <a name="ssistarttag">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td/></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>Changes the string that mod_include looks for to start an
include element</td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSIStartTag "&lt;--!"</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td/></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_include</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Available in version 2.0.30 and later.</td></tr></table></td></tr></table>

    <p>This directive changes the string that mod_include looks for 
    to mark an include element to process.</p>

    <p>You may want to use this option if have 2 servers parsing the
    output of a file each processing different commands (possibly at
    different times).</p> 

<p><strong>See also </strong></p><ul><li><code class="directive">SSIEndTag</code></li></ul><hr/><h2><a name="SSITimeFormat">SSITimeFormat</a> <a name="ssitimeformat">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Configures the format in which date strings are 
displayed</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSITimeFormat <em>formatstring</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z"</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td/></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_include</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Available in version 2.0.30 and later.</td></tr></table></td></tr></table>
<p>This directive changes the format in which date strings are displayed 
    when echoing DATE environment variables.  The <em>formatstring</em>
    is as in strftime(3) from the C standard library.</p>

    <p>This directive has the same effect as the <code>&lt;--#config
    timefmt=<em>formatstring</em> --&gt;</code> element.</p>
<hr/><h2><a name="SSIUndefinedEcho">SSIUndefinedEcho</a> <a name="ssiundefinedecho">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Changes the string that mod_include displays when
a variable isn't set.</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSIUndefinedEcho <em>tag</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSIUndefinedEcho "&lt;-- undef --&gt;"</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>FileInfo</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_include</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Available in version 2.0.34 and later.
</td></tr></table></td></tr></table>
    <p>This directive changes the string that mod_include displays
    when a variable is not set and "echoed".</p>
<hr/><h2><a name="XBitHack">XBitHack</a> <a name="xbithack">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Parse SSI directives in files with the execute 
bit set</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>XBitHack on|off|full</td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>XBitHack off</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>Options</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_include</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td/></tr></table></td></tr></table>
    <p>The XBitHack directives controls the parsing of ordinary
    html documents. This directive only affects files associated
    with the MIME type <code>text/html</code>. XBitHack can take on
    the following values:</p>

    <dl>
      <dt>off</dt>

      <dd>No special treatment of executable files.</dd>

      <dt>on</dt>

      <dd>Any text/html file that has the user-execute bit set will 
      be treated as a server-parsed html document.</dd>

      <dt>full</dt>

      <dd>
        As for <code>on</code> but also test the group-execute bit.
        If it is set, then set the Last-modified date of the
        returned file to be the last modified time of the file. If
        it is not set, then no last-modified date is sent. Setting
        this bit allows clients and proxies to cache the result of
        the request. 

        <blockquote><table><tr><td bgcolor="#e0e5f5"><strong>Note:</strong> you would not want to use the full
        option, unless you assure the group-execute bit is unset for
        every SSI script which might <code>#include</code> a CGI 
        or otherwise produces different output on each hit (or could 
        potentially change on subsequent requests).</td></tr></table></blockquote>
      </dd>
    </dl>

    <hr/><h3 align="center">Apache HTTP Server Version 2.0</h3><a href="./"><img alt="Index" src="../images/index.gif"/></a><a href="../"><img alt="Home" src="../images/home.gif"/></a></blockquote></body></html>