mod_include.html.en 59.4 KB
Newer Older
powelld's avatar
powelld committed
SSIEndTag   "%&gt;"</pre>


    <p>The example given above, which also specifies a matching
    <code class="directive"><a href="#ssiendtag">SSIEndTag</a></code>, will
    allow you to use SSI directives as shown in the example
    below:</p>

    <div class="example"><h3>SSI directives with alternate start and end tags</h3><p><code>
      &lt;%printenv %&gt;
    </code></p></div>

<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#ssiendtag">SSIEndTag</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="SSITimeFormat" id="SSITimeFormat">SSITimeFormat</a> <a name="ssitimeformat" id="ssitimeformat">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the format in which date strings are
displayed</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSITimeFormat <var>formatstring</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z"</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
</table>
<p>This directive changes the format in which date strings are displayed
    when echoing <code>DATE</code> environment variables. The
    <var>formatstring</var> is as in <code>strftime(3)</code> from the
    C standard library.</p>

    <p>This directive has the same effect as the <code>&lt;!--#config
    timefmt=<var>formatstring</var> --&gt;</code> element.</p>

    <pre class="prettyprint lang-config">SSITimeFormat "%R, %B %d, %Y"</pre>


    <p>The above directive would cause times to be displayed in the
    format "22:26, June 14, 2002".</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="SSIUndefinedEcho" id="SSIUndefinedEcho">SSIUndefinedEcho</a> <a name="ssiundefinedecho" id="ssiundefinedecho">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String displayed when an unset variable is echoed</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIUndefinedEcho <var>string</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIUndefinedEcho "(none)"</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
</table>
    <p>This directive changes the string that <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
    displays when a variable is not set and "echoed".</p>

    <pre class="prettyprint lang-config">SSIUndefinedEcho "&lt;!-- undef --&gt;"</pre>


</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="XBitHack" id="XBitHack">XBitHack</a> <a name="xbithack" id="xbithack">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Parse SSI directives in files with the execute bit
set</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>XBitHack on|off|full</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>XBitHack off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
</table>
    <p>The <code class="directive">XBitHack</code> directive controls the parsing
    of ordinary html documents. This directive only affects files associated
    with the <a class="glossarylink" href="../glossary.html#mime-type" title="see glossary">MIME-type</a> <code>text/html</code>. <code class="directive">XBitHack</code> can take on the following values:</p>

    <dl>
      <dt><code>off</code></dt>
      <dd>No special treatment of executable files.</dd>

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

      <dt><code>full</code></dt>
      <dd>As for <code>on</code> but also test the group-execute bit.
      If it is set, then set the <code>Last-modified</code> 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.

      <div class="note"><h3>Note</h3>
      <p>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).</p>

      <p>The <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code>
      directive takes precedence over the
      <code class="directive"><a href="#xbithack">XBitHack</a></code> directive when
      <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code> is set to
      <code>on</code>.</p>
      </div>

      </dd>
    </dl>


</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_include.html" title="English">&nbsp;en&nbsp;</a> |
<a href="../fr/mod/mod_include.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
<a href="../ja/mod/mod_include.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a></p>
</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
var comments_shortname = 'httpd';
var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_include.html';
(function(w, d) {
    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
        d.write('<div id="comments_thread"><\/div>');
        var s = d.createElement('script');
        s.type = 'text/javascript';
        s.async = true;
        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
    }
    else { 
        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
    }
})(window, document);
//--><!]]></script></div><div id="footer">
<p class="apache">Copyright 2017 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
if (typeof(prettyPrint) !== 'undefined') {
    prettyPrint();
}
//--><!]]></script>
</body></html>