Commit d9184c55 authored by Richard Bowen's avatar Richard Bowen
Browse files

A variety of small tweaks, including the changes that Noirin and Joshua

suggested in phrasing in the flags document. Still a lot left to do.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@417413 13f79535-47bb-0310-9956-ffa450edef68
parent dafad69c
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -27,9 +27,8 @@ providing more detailed explanations and examples of each.</p>
</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>
@@ -37,6 +36,14 @@ advanced problems</a></li></ul></div>
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>
@@ -52,7 +59,7 @@ of how you might use them.</p>
<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>


@@ -87,9 +94,10 @@ minutes (24 hours) and will be returned for all URIs.</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
@@ -110,7 +118,7 @@ an example, not as a recommendation.</p>


<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>
+8 −9
Original line number Diff line number Diff line
@@ -33,10 +33,9 @@ providing more detailed explanations and examples of each.</p>

<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
@@ -67,7 +66,7 @@ of how you might use them.</p>
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>
@@ -102,10 +101,10 @@ minutes (24 hours) and will be returned for all URIs.</p>

<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
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@
</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>
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ documentation</a></seealso>
<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>
+7 −6
Original line number Diff line number Diff line
@@ -50,15 +50,15 @@
<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>
@@ -418,7 +418,7 @@ RewriteRule ^(/~.+) http://www.somewhere.com/$1 [R,L]

    </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>

      

@@ -587,7 +587,8 @@ RewriteRule ^<strong>foo</strong>\.html$ <strong>bar</strong>.html [<strong

        <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>
@@ -595,7 +596,7 @@ RewriteRule ^<strong>foo</strong>\.html$ <strong>bar</strong>.html [<strong
<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>
Loading