</div>
<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#introduction">Introduction</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#flags">The flags</a></li>
-</ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module documentation</a></li><li><a href="rewrite_tech.html">Technical details</a></li><li><a href="rewrite_guide.html">Practical solutions to common
-problems</a></li><li><a href="rewrite_guide_advanced.html">Practical solutions to
-advanced problems</a></li></ul></div>
+</ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module documentation</a></li><li><a href="rewrite_tech.html">Technical details</a></li><li><a href="rewrite_guide.html">Rewrite Guide - useful examples</a></li><li><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide -
+advanced useful examples</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="introduction" id="introduction">Introduction</a></h2>
their behavior modified by one or more flags. Flags are included in
square brackets at the end of the rule, and multiple flags are separated
by commas.</p>
+<div class="example"><p><code>
+RewriteRule pattern target [Flag1,Flag2,Flag3]
+</code></p></div>
+
+<p>The flags all have a short form, such as <code>CO</code>, as well as
+a longer form, such as <code>cookie</code>. Some flags take one or more
+arguments. Flags are not case sensitive.</p>
+
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="flags" id="flags">The flags</a></h2>
<p>The [C] or [chain] flag indicates that the <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> is chained to the next
rule. That is, if the rule matches, then it is processed as usual and
control moves on to the next rule. However, if it does not match, then
-the next rule, and any other ruls that are chained together, will be
+the next rule, and any other rules that are chained together, will be
skipped.</p>
<h3><a name="flag_e" id="flag_e">E|env</a></h3>
<p>With the [E], or [env] flag, you can set the value of an environment
-variable. Note that some variables may be set after the rule is run, and
-so setting them in the <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> won't work, since it will
-be changed afterwards.</p>
+variable. Note that some environment variables may be set after the rule
+is run, thus unsetting what you have set. See <a href="../env.html">the
+Environment Variables document</a> for more details on how Environment
+variables work.</p>
<p>The following example sets an evironment variable called 'image' to a
value of '1' if the requested URI is an image file. Then, that
<h3><a name="flag_g" id="flag_g">G|gone</a></h3>
-<p>Forbidden flag</p>
+<p>Gone flag</p>
<h3><a name="flag_h" id="flag_h">H|handler</a></h3>
<seealso><a href="../mod/mod_rewrite.html">Module documentation</a></seealso>
<seealso><a href="rewrite_tech.html">Technical details</a></seealso>
-<seealso><a href="rewrite_guide.html">Practical solutions to common
-problems</a></seealso>
-<seealso><a href="rewrite_guide_advanced.html">Practical solutions to
-advanced problems</a></seealso>
+<seealso><a href="rewrite_guide.html">Rewrite Guide - useful examples</a></seealso>
+<seealso><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide -
+advanced useful examples</a></seealso>
<section id="introduction"><title>Introduction</title>
<p><directive module="mod_rewrite">RewriteRule</directive>s can have
module="mod_rewrite">RewriteRule</directive> is chained to the next
rule. That is, if the rule matches, then it is processed as usual and
control moves on to the next rule. However, if it does not match, then
-the next rule, and any other ruls that are chained together, will be
+the next rule, and any other rules that are chained together, will be
skipped.</p>
</section>
<section id="flag_e"><title>E|env</title>
<p>With the [E], or [env] flag, you can set the value of an environment
-variable. Note that some variables may be set after the rule is run, and
-so setting them in the <directive
-module="mod_rewrite">RewriteRule</directive> won't work, since it will
-be changed afterwards.</p>
+variable. Note that some environment variables may be set after the rule
+is run, thus unsetting what you have set. See <a href="../env.html">the
+Environment Variables document</a> for more details on how Environment
+variables work.</p>
<p>The following example sets an evironment variable called 'image' to a
value of '1' if the requested URI is an image file. Then, that
</div>
<div id="quickview"><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">mod_rewrite reference
documentation</a></li><li><a href="rewrite_intro.html">Introduction</a></li><li><a href="rewrite_tech.html">Technical details</a></li><li><a href="rewrite_guide.html">Rewrite Guide - useful examples</a></li><li><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide -
-more useful examples</a></li></ul></div>
+advanced useful examples</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="documentation" id="documentation">Documentation</a></h2>
<seealso><a href="rewrite_tech.html">Technical details</a></seealso>
<seealso><a href="rewrite_guide.html">Rewrite Guide - useful examples</a></seealso>
<seealso><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide -
-more useful examples</a></seealso>
+advanced useful examples</a></seealso>
<section id="documentation"><title>Documentation</title>
<ul>
<li><img alt="" src="../images/down.gif" /> <a href="#uservhosts">Virtual User Hosts</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#redirecthome">Redirect Homedirs For Foreigners</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#redirectanchors">Redirecting Anchors</a></li>
-<li><img alt="" src="../images/down.gif" /> Time-Dependent Rewriting</li>
+<li><img alt="" src="../images/down.gif" /> <a href="#time">Time-Dependent Rewriting</a></li>
<li><img alt="" src="../images/down.gif" /> Backward Compatibility for YYYY to XXXX migration</li>
<li><img alt="" src="../images/down.gif" /> <a href="#content">Content Handling</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#access">Access Restriction</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#other">Other</a></li>
</ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module
documentation</a></li><li><a href="rewrite_intro.html">mod_rewrite
-introduction</a></li><li><a href="rewrite_guide_advanced.html">Practical solutions to
-advanced problems</a></li><li><a href="rewrite_tech.html">Technical details</a></li></ul></div>
+introduction</a></li><li><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide - advanced
+useful examples</a></li><li><a href="rewrite_tech.html">Technical details</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="canonicalurl" id="canonicalurl">Canonical URLs</a></h2>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
-<h2>Time-Dependent Rewriting</h2>
+<h2><a name="time" id="time">Time-Dependent Rewriting</a></h2>
<dd>
<p>We just rewrite the URL to the CGI-script and force the
- correct MIME-type so it gets really run as a CGI-script.
+ handler to be <strong>cgi-script</strong> so that it is
+ executed as a CGI program.
This way a request to <code>/~quux/foo.html</code>
internally leads to the invocation of
<code>/~quux/foo.cgi</code>.</p>
<div class="example"><pre>
RewriteEngine on
RewriteBase /~quux/
-RewriteRule ^foo\.<strong>html</strong>$ foo.<strong>cgi</strong> [T=<strong>application/x-httpd-cgi</strong>]
+RewriteRule ^foo\.<strong>html</strong>$ foo.<strong>cgi</strong> [H=<strong>cgi-script</strong>]
</pre></div>
</dd>
</dl>
documentation</a></seealso>
<seealso><a href="rewrite_intro.html">mod_rewrite
introduction</a></seealso>
-<seealso><a href="rewrite_guide_advanced.html">Practical solutions to
-advanced problems</a></seealso>
+<seealso><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide - advanced
+useful examples</a></seealso>
<seealso><a href="rewrite_tech.html">Technical details</a></seealso>
</section>
- <section>
+ <section id="time">
<title>Time-Dependent Rewriting</title>
<dd>
<p>We just rewrite the URL to the CGI-script and force the
- correct MIME-type so it gets really run as a CGI-script.
+ handler to be <strong>cgi-script</strong> so that it is
+ executed as a CGI program.
This way a request to <code>/~quux/foo.html</code>
internally leads to the invocation of
<code>/~quux/foo.cgi</code>.</p>
<example><pre>
RewriteEngine on
RewriteBase /~quux/
-RewriteRule ^foo\.<strong>html</strong>$ foo.<strong>cgi</strong> [T=<strong>application/x-httpd-cgi</strong>]
+RewriteRule ^foo\.<strong>html</strong>$ foo.<strong>cgi</strong> [H=<strong>cgi-script</strong>]
</pre></example>
</dd>
</dl>
<li><img alt="" src="../images/down.gif" /> <a href="#access">Access Restriction</a></li>
</ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module
documentation</a></li><li><a href="rewrite_intro.html">mod_rewrite
-introduction</a></li><li><a href="rewrite_guide.html">Practical solutions to common
-problems</a></li><li><a href="rewrite_tech.html">Technical details</a></li></ul></div>
+introduction</a></li><li><a href="rewrite_guide.html">Rewrite Guide - useful
+examples</a></li><li><a href="rewrite_tech.html">Technical details</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="cluster" id="cluster">Webcluster through Homogeneous URL Layout</a></h2>
documentation</a></seealso>
<seealso><a href="rewrite_intro.html">mod_rewrite
introduction</a></seealso>
-<seealso><a href="rewrite_guide.html">Practical solutions to common
-problems</a></seealso>
+<seealso><a href="rewrite_guide.html">Rewrite Guide - useful
+examples</a></seealso>
<seealso><a href="rewrite_tech.html">Technical details</a></seealso>
<li><img alt="" src="../images/down.gif" /> <a href="#htaccess">.htaccess files</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#EnvVar">Environment Variables</a></li>
</ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module
-documentation</a></li><li><a href="rewrite_tech.html">Technical details</a></li><li><a href="rewrite_guide.html">Practical solutions to common
-problems</a></li><li><a href="rewrite_guide_advanced.html">Practical solutions to
-advanced problems</a></li></ul></div>
+documentation</a></li><li><a href="rewrite_tech.html">Technical details</a></li><li><a href="rewrite_guide.html">Rewrite Guide - useful examples</a></li><li><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide -
+advanced useful examples</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="introduction" id="introduction">Introduction</a></h2>
<seealso><a href="../mod/mod_rewrite.html">Module
documentation</a></seealso>
<seealso><a href="rewrite_tech.html">Technical details</a></seealso>
-<seealso><a href="rewrite_guide.html">Practical solutions to common
-problems</a></seealso>
-<seealso><a href="rewrite_guide_advanced.html">Practical solutions to
-advanced problems</a></seealso>
+<seealso><a href="rewrite_guide.html">Rewrite Guide - useful examples</a></seealso>
+<seealso><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide -
+advanced useful examples</a></seealso>
<section id="introduction"><title>Introduction</title>
<p>The Apache module <module>mod_rewrite</module> is a very powerful and
<li><img alt="" src="../images/down.gif" /> <a href="#InternalRuleset">Ruleset Processing</a></li>
</ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module
documentation</a></li><li><a href="rewrite_intro.html">mod_rewrite
-introduction</a></li><li><a href="rewrite_guide.html">Practical solutions to common
-problems</a></li><li><a href="rewrite_guide_advanced.html">Practical solutions to
-advanced problems</a></li></ul></div>
+introduction</a></li><li><a href="rewrite_guide.html">Rewrite Guide - useful
+examples</a></li><li><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide -
+advanced useful examples</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="Internal" id="Internal">Internal Processing</a></h2>
documentation</a></seealso>
<seealso><a href="rewrite_intro.html">mod_rewrite
introduction</a></seealso>
-<seealso><a href="rewrite_guide.html">Practical solutions to common
-problems</a></seealso>
-<seealso><a href="rewrite_guide_advanced.html">Practical solutions to
-advanced problems</a></seealso>
+<seealso><a href="rewrite_guide.html">Rewrite Guide - useful
+examples</a></seealso>
+<seealso><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide -
+advanced useful examples</a></seealso>
<section id="Internal"><title>Internal Processing</title>