Commit 5317ccfd authored by Richard Bowen's avatar Richard Bowen
Browse files

Move remarks about backreferences to the introductory regex discussion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157855 13f79535-47bb-0310-9956-ffa450edef68
parent b114677b
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -68,7 +68,6 @@ URLs on the fly</td></tr>
<h3>Topics</h3>
<ul id="topics">
<li><img alt="" src="../images/down.gif" /> <a href="#quoting">Quoting Special Characters</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#InternalBackRefs">Regex Back-Reference Availability</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#EnvVar">Environment Variables</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#Solutions">Practical Solutions</a></li>
</ul></div>
@@ -86,28 +85,6 @@ URLs on the fly</td></tr>
      to treat it as a backreference.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="InternalBackRefs" id="InternalBackRefs">Regex Back-Reference Availability</a></h2>

      <p>One important thing here has to be remembered: Whenever you
      use parentheses in <em>Pattern</em> or in one of the
      <em>CondPattern</em>, back-references are internally created
      which can be used with the strings <code>$N</code> and
      <code>%N</code> (see below). These are available for creating
      the strings <em>Substitution</em> and <em>TestString</em>.
      Figure 2 shows to which locations the back-references are
      transferred for expansion.</p>

<p class="figure">
      <img src="../images/mod_rewrite_fig2.gif" width="381" height="179" alt="[Needs graphics capability to display]" /><br />
      <dfn>Figure 2:</dfn> The back-reference flow through a rule.
</p>
      <p>We know this was a crash course on mod_rewrite's internal
      processing. But you will benefit from this knowledge when
      reading the following documentation of the available
      directives.</p>

</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="EnvVar" id="EnvVar">Environment Variables</a></h2>

      <p>This module keeps track of two additional (non-standard)
+0 −23
Original line number Diff line number Diff line
@@ -68,29 +68,6 @@ URLs on the fly</description>
      to treat it as a backreference.</p>
</section>

<section id="InternalBackRefs"><title>Regex Back-Reference Availability</title>

      <p>One important thing here has to be remembered: Whenever you
      use parentheses in <em>Pattern</em> or in one of the
      <em>CondPattern</em>, back-references are internally created
      which can be used with the strings <code>$N</code> and
      <code>%N</code> (see below). These are available for creating
      the strings <em>Substitution</em> and <em>TestString</em>.
      Figure 2 shows to which locations the back-references are
      transferred for expansion.</p>

<p class="figure">
      <img src="../images/mod_rewrite_fig2.gif" width="381"
           height="179" alt="[Needs graphics capability to display]" /><br />
      <dfn>Figure 2:</dfn> The back-reference flow through a rule.
</p>
      <p>We know this was a crash course on mod_rewrite's internal
      processing. But you will benefit from this knowledge when
      reading the following documentation of the available
      directives.</p>

</section>

<section id="EnvVar"><title>Environment Variables</title>

      <p>This module keeps track of two additional (non-standard)
+20 −0
Original line number Diff line number Diff line
@@ -57,6 +57,26 @@ follows is understood, rather than just copied blindly.
<div class="section">
<h2><a name="regex" id="regex">Regular Expressions</a></h2>
<p>Basic regex building blocks</p>

<h3><a name="InternalBackRefs" id="InternalBackRefs">Regex Back-Reference Availability</a></h3>

      <p>One important thing here has to be remembered: Whenever you
      use parentheses in <em>Pattern</em> or in one of the
      <em>CondPattern</em>, back-references are internally created
      which can be used with the strings <code>$N</code> and
      <code>%N</code> (see below). These are available for creating
      the strings <em>Substitution</em> and <em>TestString</em>.
      Figure 2 shows to which locations the back-references are
      transferred for expansion.</p>

<p class="figure">
      <img src="../images/mod_rewrite_fig2.gif" width="381" height="179" alt="[Needs graphics capability to display]" /><br />
      <dfn>Figure 2:</dfn> The back-reference flow through a rule.
</p>




</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="rewriterule" id="rewriterule">RewriteRule basics</a></h2>
+21 −0
Original line number Diff line number Diff line
@@ -57,6 +57,27 @@ follows is understood, rather than just copied blindly.

<section id="regex"><title>Regular Expressions</title>
<p>Basic regex building blocks</p>

<section id="InternalBackRefs"><title>Regex Back-Reference Availability</title>

      <p>One important thing here has to be remembered: Whenever you
      use parentheses in <em>Pattern</em> or in one of the
      <em>CondPattern</em>, back-references are internally created
      which can be used with the strings <code>$N</code> and
      <code>%N</code> (see below). These are available for creating
      the strings <em>Substitution</em> and <em>TestString</em>.
      Figure 2 shows to which locations the back-references are
      transferred for expansion.</p>

<p class="figure">
      <img src="../images/mod_rewrite_fig2.gif" width="381"
           height="179" alt="[Needs graphics capability to display]" /><br />
      <dfn>Figure 2:</dfn> The back-reference flow through a rule.
</p>

</section>


</section>

<section id="rewriterule"><title>RewriteRule basics</title>