You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2019/11/13 13:27:27 UTC

svn commit: r1869739 [10/10] - in /httpd/httpd/branches/2.4.x/docs: man/ manual/misc/ manual/mod/ manual/programs/ manual/rewrite/

Modified: httpd/httpd/branches/2.4.x/docs/manual/programs/httxt2dbm.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/programs/httxt2dbm.html.en?rev=1869739&r1=1869738&r2=1869739&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/programs/httxt2dbm.html.en (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/programs/httxt2dbm.html.en Wed Nov 13 13:27:27 2019
@@ -31,7 +31,7 @@
     <p><code>httxt2dbm</code> is used to generate dbm files from text input, for
     use in <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> with the
     <code>dbm</code> map type.</p>
-    
+
     <p>If the output file already exists, it will not be truncated. New keys will be
     added and existing keys will be updated.</p>
 </div>
@@ -66,7 +66,7 @@
     </dd>
 
     <dt><code>-i <var>SOURCE_TXT</var></code></dt>
-    <dd>Input file from which the dbm is to be created. The file should be formated
+    <dd>Input file from which the dbm is to be created. The file should be formatted
     with one record per line, of the form: <code>key value</code>.
     See the documentation for <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> for
     further details of this file's format and meaning.

Modified: httpd/httpd/branches/2.4.x/docs/manual/programs/httxt2dbm.html.tr.utf8
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/programs/httxt2dbm.html.tr.utf8?rev=1869739&r1=1869738&r2=1869739&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/programs/httxt2dbm.html.tr.utf8 [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/programs/httxt2dbm.html.tr.utf8 [utf-8] Wed Nov 13 13:27:27 2019
@@ -27,6 +27,7 @@
 <a href="../fr/programs/httxt2dbm.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../tr/programs/httxt2dbm.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
 </div>
+<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
 
     <p><code><strong>httxt2dbm</strong></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> ile kullanmak için düz metin
     dosyalardan DBM dosyaları üretir.</p>

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/advanced.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/advanced.html.en?rev=1869739&r1=1869738&r2=1869739&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/advanced.html.en (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/advanced.html.en Wed Nov 13 13:27:27 2019
@@ -94,8 +94,8 @@ http://physical_host_of_user1/u/user/any
       a user has no entry in the map:</p>
 
 <pre class="prettyprint lang-config">RewriteEngine on
-RewriteMap      users-to-hosts   "txt:/path/to/map.users-to-hosts"
-RewriteRule   "^/u/([^/]+)/?(.*)"   "http://${users-to-hosts:$1|server0}/u/$1/$2"</pre>
+RewriteMap    users-to-hosts      "txt:/path/to/map.users-to-hosts"
+RewriteRule   "^/u/([^/]+)/?(.*)" "http://${users-to-hosts:$1|server0}/u/$1/$2"</pre>
 
     </dd>
   </dl>
@@ -127,7 +127,7 @@ RewriteRule   "^/u/([^/]+)/?(.*)"   "htt
 
 <pre class="prettyprint lang-config"># This example is valid in per-directory context only
 RewriteCond "%{REQUEST_URI}"   "!-U"
-RewriteRule "^(.+)\.html$"          "/regenerate_page.cgi"   [PT,L]</pre>
+RewriteRule "^(.+)\.html$"     "/regenerate_page.cgi"   [PT,L]</pre>
 
 
     <p>The <code>-U</code> operator determines whether the test string
@@ -166,8 +166,8 @@ RewriteRule "^(.+)\.html$"          "/re
       to accomplish this.</p>
 
 <pre class="prettyprint lang-config">RewriteEngine on
-RewriteMap lb "rnd:/path/to/serverlist.txt"
-RewriteRule "^/(.*)" "http://${lb:servers}/$1" [P,L]</pre>
+RewriteMap lb        "rnd:/path/to/serverlist.txt"
+RewriteRule "^/(.*)" "http://${lb:servers}/$1"     [P,L]</pre>
 
 
 <p><code>serverlist.txt</code> will contain a list of the servers:</p>
@@ -306,10 +306,10 @@ RewriteRule   "^foo\.html$"
     <dt>Description:</dt>
 
     <dd>
-      <p>At time, we want to maintain some kind of status when we
+      <p>At times, we want to maintain some kind of status when we
       perform a rewrite. For example, you want to make a note that
       you've done that rewrite, so that you can check later to see if a
-      request can via that rewrite. One way to do this is by setting an
+      request came via that rewrite. One way to do this is by setting an
       environment variable.</p>
     </dd>
 
@@ -330,7 +330,10 @@ RewriteRule   "^/horse/(.*)"   "/pony/$1
 
     <p>Note that environment variables do not survive an external
     redirect. You might consider using the [CO] flag to set a
-    cookie.</p>
+    cookie. For per-directory and htaccess rewrites, where the final
+    substitution is processed as an internal redirect, environment
+    variables from the previous round of rewriting are prefixed with
+    "REDIRECT_". </p>
 
     </dd>
   </dl>

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.html.en?rev=1869739&r1=1869738&r2=1869739&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.html.en (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.html.en Wed Nov 13 13:27:27 2019
@@ -73,7 +73,7 @@ it will tell you exactly how each rule i
 <div class="section">
 <h2><a name="regex" id="regex">Regular Expressions</a></h2>
 
-<p>mod_rewrite uses the <a href="http://pcre.org/">Perl Compatible
+<p><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> 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
@@ -101,32 +101,65 @@ well as write your own.</p>
 <th>Example</th>
 </tr>
 
-<tr><td><code>.</code></td><td>Matches any single
-character</td><td><code>c.t</code> will match <code>cat</code>,
-<code>cot</code>, <code>cut</code>, etc.</td></tr>
-<tr><td><code>+</code></td><td>Repeats the previous match one or more
-times</td><td><code>a+</code> matches <code>a</code>, <code>aa</code>,
-<code>aaa</code>, etc</td></tr>
-<tr><td><code>*</code></td><td>Repeats the previous match zero or more
-times.</td><td><code>a*</code> matches all the same things
-<code>a+</code> matches, but will also match an empty string.</td></tr>
-<tr><td><code>?</code></td><td>Makes the match optional.</td><td>
-<code>colou?r</code> will match <code>color</code> and <code>colour</code>.</td>
-</tr>
-<tr><td><code>^</code></td><td>Called an anchor, matches the beginning
-of the string</td><td><code>^a</code> matches a string that begins with
-<code>a</code></td></tr>
-<tr><td><code>$</code></td><td>The other anchor, this matches the end of
-the string.</td><td><code>a$</code> matches a string that ends with
-<code>a</code>.</td></tr>
-<tr><td><code>( )</code></td><td>Groups several characters into a single
-unit, and captures a match for use in a backreference.</td><td><code>(ab)+</code>
-matches <code>ababab</code> - that is, the <code>+</code> applies to the group.
-For more on backreferences see <a href="#InternalBackRefs">below</a>.</td></tr>
-<tr><td><code>[ ]</code></td><td>A character class - matches one of the
-characters</td><td><code>c[uoa]t</code> matches <code>cut</code>,
-<code>cot</code> or <code>cat</code>.</td></tr>
-<tr><td><code>[^ ]</code></td><td>Negative character class - matches any character not specified</td><td><code>c[^/]t</code> matches <code>cat</code> or <code>c=t</code> but not <code>c/t</code></td></tr>
+<tr>
+    <td><code>.</code></td>
+    <td>Matches any single character</td>
+    <td><code>c.t</code> will match <code>cat</code>, <code>cot</code>,
+      <code>cut</code>, etc</td>
+</tr>
+<tr>
+    <td><code>+</code></td>
+    <td>Repeats the previous match one or more times</td>
+    <td><code>a+</code> matches <code>a</code>, <code>aa</code>,
+      <code>aaa</code>, etc</td>
+</tr>
+<tr>
+    <td><code>*</code></td>
+    <td>Repeats the previous match zero or more times</td>
+    <td><code>a*</code> matches all the same things <code>a+</code> matches,
+      but will also match an empty string</td>
+</tr>
+<tr>
+    <td><code>?</code></td>
+    <td>Makes the match optional</td>
+    <td><code>colou?r</code> will match <code>color</code> and
+    <code>colour</code></td>
+</tr>
+<tr>
+    <td><code>\</code></td>
+    <td>Escape the next character</td>
+    <td><code>\.</code> will match <code>.</code> (dot) and not <em>any single
+    character</em> as explain above</td>
+</tr>
+<tr>
+    <td><code>^</code></td>
+    <td>Called an anchor, matches the beginning of the string</td>
+    <td><code>^a</code> matches a string that begins with <code>a</code></td>
+</tr>
+<tr>
+    <td><code>$</code></td>
+    <td>The other anchor, this matches the end of the string</td>
+    <td><code>a$</code> matches a string that ends with <code>a</code></td>
+</tr>
+<tr>
+    <td><code>( )</code></td>
+    <td>Groups several characters into a single unit, and captures a match
+      for use in a backreference</td>
+    <td><code>(ab)+</code> matches <code>ababab</code> - that is, the
+      <code>+</code> applies to the group. For more on backreferences see
+      <a href="#InternalBackRefs">below</a></td>
+</tr>
+<tr>
+    <td><code>[ ]</code></td>
+    <td>A character class - matches one of the characters</td>
+    <td><code>c[uoa]t</code> matches <code>cut</code>, <code>cot</code> or
+      <code>cat</code></td>
+</tr>
+<tr>
+    <td><code>[^ ]</code></td>
+    <td>Negative character class - matches any character not specified</td>
+    <td><code>c[^/]t</code> matches <code>cat</code> or <code>c=t</code> but
+      not <code>c/t</code></td></tr>
 </table>
 
 <p>In <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> the <code>!</code> character can be
@@ -143,21 +176,21 @@ the expression.</p>
       <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 <em>Substitution</em> parameter of a 
+      the <em>Substitution</em> parameter of a
       <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> or
-      the <em>TestString</em> parameter of a 
+      the <em>TestString</em> parameter of a
       <code class="directive"><a href="../mod/mod_rewrite.html#rewritecond">RewriteCond</a></code>.</p>
-      <p>  Captures in the <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> patterns are (counterintuitively) available to 
-       all preceding 
+      <p>  Captures in the <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> patterns are (counterintuitively) available to
+       all preceding
       <code class="directive"><a href="../mod/mod_rewrite.html#rewritecond">RewriteCond</a></code> directives,
       because the <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>
       expression is evaluated before the individual conditions.</p>
 
-      <p>Figure 1 shows to which 
-      locations the back-references are transferred for expansion as 
-      well as illustrating the flow of the RewriteRule, RewriteCond 
-      matching. In the next chapters, we will be exploring how to use 
-      these back-references, so do not fret if it seems a bit alien 
+      <p>Figure 1 shows to which
+      locations the back-references are transferred for expansion as
+      well as illustrating the flow of the RewriteRule, RewriteCond
+      matching. In the next chapters, we will be exploring how to use
+      these back-references, so do not fret if it seems a bit alien
       to you at first.
       </p>
 
@@ -179,12 +212,12 @@ of three arguments separated by spaces.
 <li><var>[flags]</var>: options affecting the rewritten request.</li>
 </ol>
 
-<p>The <var>Pattern</var> is a <a href="#regex">regular expression</a>. 
-It is initially (for the first rewrite rule or until a substitution occurs) 
-matched against the URL-path of the incoming request (the part after the 
-hostname but before any question mark indicating the beginning of a query 
-string) or, in per-directory context, against the request's path relative 
-to the directory for which the rule is defined. Once a substitution has 
+<p>The <var>Pattern</var> is a <a href="#regex">regular expression</a>.
+It is initially (for the first rewrite rule or until a substitution occurs)
+matched against the URL-path of the incoming request (the part after the
+hostname but before any question mark indicating the beginning of a query
+string) or, in per-directory context, against the request's path relative
+to the directory for which the rule is defined. Once a substitution has
 occurred, the rules that follow are matched against the substituted
 value.
 </p>
@@ -275,7 +308,7 @@ argument is a list of flags that modify
 <p>For example, to send all requests from a particular IP range to a
 different server, you could use:</p>
 <pre class="prettyprint lang-config">RewriteCond "%{REMOTE_ADDR}" "^10\.2\."
-RewriteRule "(.*)" "http://intranet.example.com$1"</pre>
+RewriteRule "(.*)"           "http://intranet.example.com$1"</pre>
 
 
 <p>When more than
@@ -286,8 +319,8 @@ applied. For example, to deny requests t
 their query string, unless they also contain a cookie containing
 the word "go", you could use:</p>
 <pre class="prettyprint lang-config">RewriteCond "%{QUERY_STRING}" "hack"
-RewriteCond "%{HTTP_COOKIE}" "!go"
-RewriteRule "." "-" [F]</pre>
+RewriteCond "%{HTTP_COOKIE}"  !go
+RewriteRule "."               "-"   [F]</pre>
 
 <p>Notice that the exclamation mark specifies a negative match, so the rule is only applied if the cookie does not contain "go".</p>
 
@@ -299,7 +332,7 @@ variables <code>%1</code>, <code>%2</cod
 will direct the request to a different directory depending on the
 hostname used to access the site:</p>
 <pre class="prettyprint lang-config">RewriteCond "%{HTTP_HOST}" "(.*)"
-RewriteRule "^/(.*)" "/sites/%1/$1"</pre>
+RewriteRule "^/(.*)"       "/sites/%1/$1"</pre>
 
 <p>If the request was for <code>http://example.com/foo/bar</code>,
 then <code>%1</code> would contain <code>example.com</code>