]> granicus.if.org Git - apache/commitdiff
Edited so that it can be validated.
authorpatrikj <patrikj@unknown>
Tue, 12 Mar 2002 15:22:45 +0000 (15:22 +0000)
committerpatrikj <patrikj@unknown>
Tue, 12 Mar 2002 15:22:45 +0000 (15:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93856 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.xml

index ff31e179bce22e268421d010676e89da714f509e..f2a2dc09cf7d5ab9dfff825a339dfbc4ff7bdf8c 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!DOCTYPE xml:manual [ <!ENTITY nbsp "&#160;"> ]>
+<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.xsl"?>
 <modulesynopsis>
 
@@ -18,24 +18,21 @@ URLs on the fly</description>
             <em>``The great thing about mod_rewrite is it gives you
             all the configurability and flexibility of Sendmail.
             The downside to mod_rewrite is that it gives you all
-            the configurability and flexibility of Sendmail.''</em>
-            
+            the configurability and flexibility of Sendmail.''</em><br />
+
+            &nbsp;&nbsp;&nbsp;&nbsp;  -- Brian Behlendorf<br />
+            &nbsp;&nbsp;&nbsp;&nbsp;   Apache Group
 
-            <div align="RIGHT">
-              -- Brian Behlendorf<br />
-               Apache Group
-            </div>
       </blockquote>
 
       <blockquote>
             <em>`` Despite the tons of examples and docs,
             mod_rewrite is voodoo. Damned cool voodoo, but still
-            voodoo. ''</em> 
+            voodoo. ''</em> <br />
+
+              &nbsp;&nbsp;&nbsp;&nbsp;-- Brian Moore<br />
+              &nbsp;&nbsp;&nbsp;&nbsp; bem@news.cmc.net
 
-            <div align="RIGHT">
-              -- Brian Moore<br />
-               bem@news.cmc.net
-            </div>
           </blockquote>
 
 
@@ -178,23 +175,11 @@ URLs on the fly</description>
       directives). For historical reasons the conditions are given
       first, and so the control flow is a little bit long-winded. See
       Figure 1 for more details.</p>
-
-      <div align="CENTER">
-        <table cellspacing="0" cellpadding="2" border="0">
-          <tr>
-            <td bgcolor="#CCCCCC"><img
-            src="../images/mod_rewrite_fig1.gif" width="428"
-            height="385"
-            alt="[Needs graphics capability to display]" /></td>
-          </tr>
-
-          <tr>
-            <td align="CENTER"><strong>Figure 1:</strong> The
-            control flow through the rewriting ruleset</td>
-          </tr>
-        </table>
-      </div>
-
+<section>
+      <img src="../images/mod_rewrite_fig1.gif" border="1" width="428"
+           height="385" alt="[Needs graphics capability to display]" />
+      <p><strong>Figure 1:</strong>The control flow through the rewriting ruleset</p>
+</section>
       <p>As you can see, first the URL is matched against the
       <em>Pattern</em> of each rule. When it fails mod_rewrite
       immediately stops processing this rule and continues with the
@@ -221,11 +206,11 @@ URLs on the fly</description>
 <section id="quoting"><title>Quoting Special Characters</title>
 
       <p>As of Apache 1.3.20, special characters in
-      <i>TestString</i> and <i>Substitution</i> strings can be
+      <em>TestString</em> and <em>Substitution</em> strings can be
       escaped (that is, treated as normal characters without their
       usual special meaning) by prefixing them with a slosh ('\')
       character. In other words, you can include an actual
-      dollar-sign character in a <i>Substitution</i> string by
+      dollar-sign character in a <em>Substitution</em> string by
       using '<code>\$</code>'; this keeps mod_rewrite from trying
       to treat it as a backreference.</p>
 </section>
@@ -241,22 +226,11 @@ URLs on the fly</description>
       Figure 2 shows to which locations the back-references are
       transfered for expansion.</p>
 
-      <div align="CENTER">
-        <table cellspacing="0" cellpadding="2" border="0">
-          <tr>
-            <td bgcolor="#CCCCCC"><img
-            src="../images/mod_rewrite_fig2.gif" width="381"
-            height="179"
-            alt="[Needs graphics capability to display]" /></td>
-          </tr>
-
-          <tr>
-            <td align="CENTER"><strong>Figure 2:</strong> The
-            back-reference flow through a rule</td>
-          </tr>
-        </table>
-      </div>
-
+<section>
+      <img src="../images/mod_rewrite_fig2.gif" border="1" width="381"
+           height="179" alt="[Needs graphics capability to display]" />
+      <p><strong>Figure 2:</strong> The back-reference flow through a rule.</p>
+</section>
       <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
@@ -305,11 +279,8 @@ SCRIPT_URI=http://en1.engelschall.com/u/rse/
 
 
 <directivesynopsis>
-
 <name>RewriteEngine</name>
-
-<summary>Enables or disables runtime rewriting engine</summary>
-
+<description>Enables or disables runtime rewriting engine</description>
 <syntax>RewriteEngine on|off</syntax>
 <default>RewriteEngine off</default>
 <contextlist><context>server config</context><context>virtual host</context>
@@ -391,7 +362,7 @@ processing</description>
           directive or use <code>RewriteLogLevel 0</code>!
 </note>
 
-<note><title>Security</title>
+<note type="securitywarning"><title>Security</title>
 
 See the <a href="../misc/security_tips.html">Apache Security Tips</a>
 document for details on why your security could be compromised if the
@@ -688,12 +659,12 @@ while (&lt;STDIN&gt;) {
           </ol>
         </li>
       </ul>
-      The <directive>RewriteMap</directive> directive can occur more than
+      <p>The <directive>RewriteMap</directive> directive can occur more than
       once. For each mapping-function use one
       <directive>RewriteMap</directive> directive to declare its rewriting
       mapfile. While you cannot <strong>declare</strong> a map in
       per-directory context it is of course possible to
-      <strong>use</strong> this map in per-directory context. 
+      <strong>use</strong> this map in per-directory context. </p>
 
 <note><title>Note</title> For plain text and DBM format files the
 looked-up keys are cached in-core until the <code>mtime</code> of the
@@ -710,7 +681,7 @@ once!
 <name>RewriteBase</name>
 <description>Sets the base URL for per-directory rewrites</description>
 <syntax>RewriteBase <em>URL-path</em></syntax>
-<default>RewriteBase <em>physical-directory-path</em></default>
+<default>See usage for information.</default>
 <contextlist><context>directory</context><context>.htaccess</context>
 </contextlist>
 <override>FileInfo</override>
@@ -724,7 +695,7 @@ once!
       <em>i.e.</em>, the local directory prefix is stripped at this
       stage of processing and your rewriting rules act only on the
       remainder. At the end it is automatically added back to the
-      path.</p>
+      path. The default setting is; <directive>RewriteBase</directive> <em>physical-directory-path</em></p>
 
       <p>When a substitution occurs for a new URL, this module has
       to re-inject the URL into the server processing. To be able
@@ -772,7 +743,7 @@ RewriteRule   ^oldstuff\.html$  newstuff.html
 <p>The following list gives detailed information about
               the internal processing steps:</p>
 <pre>
-<font size="-1">Request:
+Request:
   /xyz/oldstuff.html
 
 Internal Processing:
@@ -783,9 +754,8 @@ Internal Processing:
 
 Result:
   /abc/def/newstuff.html
-</font>
 </pre>
-              <p><font size="-1">This seems very complicated but is
+              <p>This seems very complicated but is
               the correct Apache internal processing, because the
               per-directory rewriting comes too late in the
               process. So, when it occurs the (rewritten) request
@@ -795,7 +765,7 @@ Result:
               internally to the Apache server and the same
               procedure is used by many other operations inside
               Apache. So, you can be sure the design and
-              implementation is correct.</font></p>
+              implementation is correct.</p>
 </note>
 
 </usage>
@@ -877,23 +847,23 @@ Result:
 
           <table bgcolor="#F0F0F0" cellspacing="0" cellpadding="5">
             <tr>
-              <td valign="TOP">
+              <td>
                 <strong>HTTP headers:</strong> 
 
-                <p><font size="-1">HTTP_USER_AGENT<br />
+                <p>HTTP_USER_AGENT<br />
                  HTTP_REFERER<br />
                  HTTP_COOKIE<br />
                  HTTP_FORWARDED<br />
                  HTTP_HOST<br />
                  HTTP_PROXY_CONNECTION<br />
                  HTTP_ACCEPT<br />
-                </font></p>
+                </p>
               </td>
 
-              <td valign="TOP">
+              <td>
                 <strong>connection &amp; request:</strong> 
 
-                <p><font size="-1">REMOTE_ADDR<br />
+                <p>REMOTE_ADDR<br />
                  REMOTE_HOST<br />
                  REMOTE_USER<br />
                  REMOTE_IDENT<br />
@@ -902,28 +872,28 @@ Result:
                  PATH_INFO<br />
                  QUERY_STRING<br />
                  AUTH_TYPE<br />
-                </font></p>
+                </p>
               </td>
             </tr>
 
             <tr>
-              <td valign="TOP">
+              <td>
                 <strong>server internals:</strong> 
 
-                <p><font size="-1">DOCUMENT_ROOT<br />
+                <p>DOCUMENT_ROOT<br />
                  SERVER_ADMIN<br />
                  SERVER_NAME<br />
                  SERVER_ADDR<br />
                  SERVER_PORT<br />
                  SERVER_PROTOCOL<br />
                  SERVER_SOFTWARE<br />
-                </font></p>
+                </p>
               </td>
 
-              <td valign="TOP">
+              <td>
                 <strong>system stuff:</strong> 
 
-                <p><font size="-1">TIME_YEAR<br />
+                <p>TIME_YEAR<br />
                  TIME_MON<br />
                  TIME_DAY<br />
                  TIME_HOUR<br />
@@ -931,18 +901,18 @@ Result:
                  TIME_SEC<br />
                  TIME_WDAY<br />
                  TIME<br />
-                </font></p>
+                </p>
               </td>
 
-              <td valign="TOP">
+              <td>
                 <strong>specials:</strong> 
 
-                <p><font size="-1">API_VERSION<br />
+                <p>API_VERSION<br />
                  THE_REQUEST<br />
                  REQUEST_URI<br />
                  REQUEST_FILENAME<br />
                  IS_SUBREQ<br />
-                </font></p>
+                </p>
               </td>
             </tr>
           </table>
@@ -1091,7 +1061,7 @@ Result:
             <em>TestString</em> is lexically equal to
             <em>CondPattern</em>, i.e the two strings are exactly
             equal (character by character). If <em>CondPattern</em>
-            is just <samp>""</samp> (two quotation marks) this
+            is just <code>""</code> (two quotation marks) this
             compares <em>TestString</em> to the empty string.</li>
 
             <li>'<strong>-d</strong>' (is
@@ -1146,9 +1116,10 @@ Result:
       <blockquote>
         <strong><code>[</code><em>flags</em><code>]</code></strong>
       </blockquote>
-      as the third argument to the <code>RewriteCond</code>
+
+      <p>as the third argument to the <code>RewriteCond</code>
       directive. <em>Flags</em> is a comma-separated list of the
-      following flags: 
+      following flags:</p>
 
       <ul>
         <li>'<strong><code>nocase|NC</code></strong>'
@@ -1241,7 +1212,7 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
 
       <table bgcolor="#F0F0F0" cellspacing="0" cellpadding="5">
         <tr>
-          <td valign="TOP">
+          <td>
 <pre>
 <strong>Text:</strong>
   <strong><code>.</code></strong>           Any single character
@@ -1324,7 +1295,7 @@ When using the NOT character
         <li><a href="#mapfunc">mapping-function</a> calls
         (<code>${mapname:key|default}</code>)</li>
       </ol>
-      Back-references are <code>$</code><strong>N</strong>
+      <p>Back-references are <code>$</code><strong>N</strong>
       (<strong>N</strong>=0..9) identifiers which will be replaced
       by the contents of the <strong>N</strong>th group of the
       matched <em>Pattern</em>. The server-variables are the same
@@ -1332,7 +1303,7 @@ When using the NOT character
       directive. The mapping-functions come from the
       <code>RewriteMap</code> directive and are explained there.
       These three types of variables are expanded in the order of
-      the above list. 
+      the above list. </p>
 
       <p>As already mentioned above, all the rewriting rules are
       applied to the <em>Substitution</em> (in the order of
@@ -1385,9 +1356,10 @@ There is a special feature:
       <blockquote>
         <strong><code>[</code><em>flags</em><code>]</code></strong>
       </blockquote>
+      <p>
       as the third argument to the <code>RewriteRule</code>
       directive. <em>Flags</em> is a comma-separated list of the
-      following flags: 
+      following flags: </p>
 
       <ul>
         <li>
@@ -1771,7 +1743,8 @@ directory which is not always possible.
           <code>/</code> <em>Language</em> <code>/~</code>
           <em>Realname</em> <code>/.../</code> <em>File</em>
         </blockquote>
-        into 
+
+        <p>into </p>
 
         <blockquote>
           <code>/u/</code> <em>Username</em> <code>/.../</code>
@@ -1789,10 +1762,7 @@ RewriteLog   /path/to/file/rewrite.log
 RewriteMap   real-to-user               txt:/path/to/file/map.txt
 RewriteRule  ^/([^/]+)/~([^/]+)/(.*)$   /u/${real-to-user:$2|nobody}/$3.$1
 </pre>
-</example>
-
-</usage>
-</directivesynopsis>
-
+   </example>
+  </usage>
+ </directivesynopsis>
 </modulesynopsis>
-