Commit 899fa83d authored by Richard Bowen's avatar Richard Bowen
Browse files

Started filling in some of the details of an introduction to rewriting

URLs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@158972 13f79535-47bb-0310-9956-ffa450edef68
parent 3a3d4cc9
Loading
Loading
Loading
Loading
+30 −3
Original line number Diff line number Diff line
@@ -56,7 +56,36 @@ follows is understood, rather than just copied blindly.
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="regex" id="regex">Regular Expressions</a></h2>
<p>Basic regex building blocks</p>

<p>mod_rewrite uses the <a href="http://pcre.org/">Perl Compatible
Regular Expression</a> vocabulary. In this document, we do not attempt
to provide a detailed reference to regular expressions. For that, we
recommend the <a href="http://pcre.org/pcre.txt">PCRE man pages</a>, the
<a href="http://www.perldoc.com/perl5.8.0/pod/perlre.html">Perl regular
expression man page</a>, and <a href="http://www.oreilly.com/catalog/regex2/index.html">Mastering
Regular Expressions, by Jeffrey Friedl</a>.</p>

<p>In this document, we attempt to provide enough of a regex vocabulary
to get you started, without being overwhelming, in the hope that
<code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>s will be scientific
formulae, rather than magical incantations.</p>

<h3><a name="regexvocab" id="regexvocab">Regex vocabulary</a></h3>

<p>The following are the minimal building blocks you will need, in order
to write regular expressions and <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>s.</p>

<table>
<tr>
<th>Character</th>
<th>Meaning</th>
</tr>

<tr><td><code>.</code></td><td>Matches any character</td></tr>

</table>



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

@@ -75,8 +104,6 @@ follows is understood, rather than just copied blindly.
</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>
+32 −3
Original line number Diff line number Diff line
@@ -56,7 +56,38 @@ follows is understood, rather than just copied blindly.
</section>

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

<p>mod_rewrite uses the <a href="http://pcre.org/">Perl Compatible
Regular Expression</a> vocabulary. In this document, we do not attempt
to provide a detailed reference to regular expressions. For that, we
recommend the <a href="http://pcre.org/pcre.txt">PCRE man pages</a>, the
<a href="http://www.perldoc.com/perl5.8.0/pod/perlre.html">Perl regular
expression man page</a>, and <a
href="http://www.oreilly.com/catalog/regex2/index.html">Mastering
Regular Expressions, by Jeffrey Friedl</a>.</p>

<p>In this document, we attempt to provide enough of a regex vocabulary
to get you started, without being overwhelming, in the hope that
<directive module="mod_rewrite">RewriteRule</directive>s will be scientific
formulae, rather than magical incantations.</p>

<section id="regexvocab"><title>Regex vocabulary</title>

<p>The following are the minimal building blocks you will need, in order
to write regular expressions and <directive
module="mod_rewrite">RewriteRule</directive>s.</p>

<table>
<tr>
<th>Character</th>
<th>Meaning</th>
</tr>

<tr><td><code>.</code></td><td>Matches any character</td></tr>

</table>

</section>

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

@@ -76,8 +107,6 @@ follows is understood, rather than just copied blindly.
</p>

</section>


</section>

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