<p><span>Available Languages: </span><a href="../en/mod/mod_substitute.html" title="English"> en </a></p>
</div>
<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Perform search and replace operations on response bodies</td></tr>
<p>The <code class="directive">Substitute</code> directive specifies a
search and replace pattern to apply to the response body.</p>
<p>The meaning of the pattern can be modified by using any
combination of these flags:</p>
<dl>
<dt><code>i</code></dt>
<dd>Perform a case-insensitive match.</dd>
<dt><code>n</code></dt>
<dd>By default the pattern is treated as a regular expression.
Using the <code>n</code> flag forces the pattern to be treated
as a fixed string.</dd>
<dt><code>f</code></dt>
<dd>The <code>f</code> flag causes mod_substitute to flatten the
result of a substitution allowing for later substitutions to
take place on the boundary of this one.</dd>
</dl>
<div class="example"><h3>Example</h3><p><code>
<Location />
<span class="indent">
AddOutputFilterByType SUBSTITUTE text/html<br />
Substitute s/foo/bar/ni<br />
</span>
</Location>
</code></p></div>
<p>If either the pattern or the substitution contain a slash
character then an alternative delimiter should be used:</p>
<div class="example"><h3>Example of using an alternate delimiter</h3><p><code>
<Location />
<span class="indent">
AddOutputFilterByType SUBSTITUTE text/html<br />
Substitute "s|<BR */?>|<br />|i"
</span>
</Location>
</code></p></div>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_substitute.html" title="English"> en </a></p>
</div><div id="footer">
<p class="apache">Copyright 2007 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>