]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Rebuilds this morning's work
authorRich Bowen <rbowen@apache.org>
Fri, 1 May 2026 17:33:21 +0000 (17:33 +0000)
committerRich Bowen <rbowen@apache.org>
Fri, 1 May 2026 17:33:21 +0000 (17:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933675 13f79535-47bb-0310-9956-ffa450edef68

55 files changed:
docs/manual/glossary.html.en.utf8
docs/manual/glossary.xml.de
docs/manual/glossary.xml.fr
docs/manual/glossary.xml.ja
docs/manual/glossary.xml.ko
docs/manual/glossary.xml.tr
docs/manual/mod/core.html.en.utf8
docs/manual/mod/core.xml.de
docs/manual/mod/core.xml.es
docs/manual/mod/core.xml.fr
docs/manual/mod/core.xml.ja
docs/manual/mod/core.xml.tr
docs/manual/mod/mod_authz_core.html.en.utf8
docs/manual/mod/mod_authz_core.html.fr.utf8
docs/manual/mod/mod_authz_core.xml.fr
docs/manual/mod/mod_authz_core.xml.meta
docs/manual/mod/mod_proxy.html.en.utf8
docs/manual/mod/mod_proxy.xml.fr
docs/manual/mod/mod_proxy.xml.ja
docs/manual/mod/mod_rewrite.html.en.utf8
docs/manual/mod/mod_rewrite.xml.fr
docs/manual/mod/mod_ssl.html.en.utf8
docs/manual/mod/mod_ssl.xml.es
docs/manual/mod/mod_ssl.xml.fr
docs/manual/mod/mpm_common.html.en.utf8
docs/manual/mod/mpm_common.xml.de
docs/manual/mod/mpm_common.xml.fr
docs/manual/mod/mpm_common.xml.ja
docs/manual/mod/mpm_common.xml.tr
docs/manual/rewrite/avoid.html.en.utf8
docs/manual/rewrite/avoid.xml
docs/manual/rewrite/htaccess.html.de
docs/manual/rewrite/htaccess.html.en.utf8
docs/manual/rewrite/htaccess.html.es.utf8
docs/manual/rewrite/htaccess.html.fr.utf8
docs/manual/rewrite/htaccess.html.ja.utf8
docs/manual/rewrite/htaccess.html.ko.euc-kr
docs/manual/rewrite/htaccess.html.tr.utf8
docs/manual/rewrite/htaccess.html.zh-cn.utf8
docs/manual/rewrite/htaccess.xml
docs/manual/rewrite/htaccess.xml.de
docs/manual/rewrite/htaccess.xml.es
docs/manual/rewrite/htaccess.xml.fr
docs/manual/rewrite/htaccess.xml.ja
docs/manual/rewrite/htaccess.xml.ko
docs/manual/rewrite/htaccess.xml.meta
docs/manual/rewrite/htaccess.xml.tr
docs/manual/rewrite/htaccess.xml.zh-cn
docs/manual/rewrite/intro.html.fr.utf8
docs/manual/vhosts/details.html.en.utf8
docs/manual/vhosts/details.html.fr.utf8
docs/manual/vhosts/details.xml.fr
docs/manual/vhosts/details.xml.ko
docs/manual/vhosts/details.xml.meta
docs/manual/vhosts/details.xml.tr

index 0c014ed4393cc57a524f20b2a92b1afe9c7e88a2..3f6b668141aa5b2890e8e70cf4d7ab14f01ac43c 100644 (file)
       See: <a href="ssl/">SSL/TLS Encryption</a>
     </dd>
 
+    <dt><a name="perdirectory" id="perdirectory">Per-directory Context</a></dt>
+    <dd>A <a class="glossarylink" href="./glossary.html#directive" title="see glossary">directive</a> is in
+      per-directory context when it appears in a <code class="directive"><a href="./mod/core.html#directory">&lt;Directory&gt;</a></code>, <code class="directive"><a href="./mod/core.html#directorymatch">&lt;DirectoryMatch&gt;</a></code>, <code class="directive"><a href="./mod/core.html#files">&lt;Files&gt;</a></code>, or <code class="directive"><a href="./mod/core.html#filesmatch">&lt;FilesMatch&gt;</a></code> section in the main
+      configuration files, or in a <code>.htaccess</code> file.
+      In per-directory context, directives apply only to the
+      directory (or set of files) they are associated with.<br />
+      See: <a href="sections.html">Configuration Sections</a>
+    </dd>
+
     <dt><a name="plaintext" id="plaintext">Plaintext</a></dt>
     <dd>The unencrypted text.</dd>
 
index ca25d8d547c8346126e696ac739e70bed98730d3..658422af181b15f291b95073baad6b176860370a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='UTF-8' ?>
 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="./style/manual.de.xsl"?>
-<!-- English Revision: 420990:1933506 (outdated) -->
+<!-- English Revision: 420990:1933655 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 695a39a91730b85df7355264002a841379a07b67..67da53a60a73ba1f40c21bcc6ea69804176db6cd 100644 (file)
@@ -3,7 +3,7 @@
 <?xml-stylesheet type="text/xsl" href="./style/manual.fr.xsl"?>
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
-<!-- English Revision: 1933086:1933506 (outdated) -->
+<!-- English Revision: 1933086:1933655 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index b31cb82d8c33374bcea6d2e3106a2b0cb3b15470..4f1a8c51e256e13abae363530b556848916cc0cc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="./style/manual.ja.xsl"?>
-<!-- English Revision: 664361:1933506 (outdated) -->
+<!-- English Revision: 664361:1933655 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 1eb2ba38784a81459915763dce4cc395c3d5b227..72dd137c1cf3b59b1a5eb288957233eeb915cb37 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="EUC-KR" ?>
 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="./style/manual.ko.xsl"?>
-<!-- English Revision: 105989:1933506 (outdated) -->
+<!-- English Revision: 105989:1933655 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 85668585093cacd3c27a96b1e83f425c2b4d6719..dc058d51b5f8a0e8bda6627348bf1d970baa9641 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="./style/manual.tr.xsl"?>
-<!-- English Revision: 1174747:1933506 (outdated) -->
+<!-- English Revision: 1174747:1933655 (outdated) -->
 <!-- =====================================================
  Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
    Reviewed by: Orhan Berent <berent belgeler.org>
index f1211c107b654f55c85ee0be022f2c3a3e2ca9c9..6b835449e0ad37f5cacb23581c5434005ed6dab7 100644 (file)
@@ -1568,14 +1568,14 @@ ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"</pre>
     without causing any log message, the additional information is not logged
     either.</p>
 
-    <p>It can happen that some format string items do not produce output.  For
+    <p>It can happen that some format specifiers do not produce output.  For
     example, the Referer header is only present if the log message is
     associated to a request and the log message happens at a time when the
     Referer header has already been read from the client.  If no output is
     produced, the default behavior is to delete everything from the preceding
-    space character to the next space character.  This means the log line is
+    space character to the next space character.  This means the format string is
     implicitly divided into fields on non-whitespace to whitespace transitions.
-    If a format string item does not produce output, the whole field is
+    If a format specifier does not produce output, the whole field is
     omitted.  For example, if the remote address <code>%a</code> in the log
     format <code>[%t] [%l] [%a] %M&nbsp;</code> is not available, the surrounding
     brackets are not logged either.  Space characters can be escaped with a
@@ -1617,7 +1617,7 @@ ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"</pre>
     </tr>
 </table>
 
-    <p>Some format string items accept additional parameters in braces.</p>
+    <p>Some format specifiers accept additional parameters in braces.</p>
 
     <table class="bordered"><tr class="header"><th>Format&nbsp;String</th> <th>Description</th></tr>
 <tr><td><code>%%</code></td>
@@ -3995,6 +3995,9 @@ directory</td></tr>
       The server will follow symbolic links in this directory. This is
       the default setting.
       <div class="note">
+      <p>Disabling this option also prevents
+      <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> from operating in per-directory
+      context (<code>.htaccess</code> files and <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections).</p>
       <p>Even though the server follows the symlink it does <em>not</em>
       change the pathname used to match against <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections.</p>
 
@@ -4736,11 +4739,19 @@ is accessed by an incompatible browser</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
 </table>
     <p>The <code class="directive">ServerPath</code> directive sets the legacy
-    URL pathname for a host, for use with <a href="../vhosts/">name-based virtual hosts</a>.</p>
+    URL pathname for a host, for use with <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p>
+
+    <div class="note"><p>This is a legacy feature for providing compatibility with
+    HTTP/1.0 clients that do not send a <code>Host:</code> header. When
+    such a client requests a URL matching a vhost's
+    <code class="directive">ServerPath</code>, the request is served from that
+    vhost. In practice, all modern HTTP clients send the
+    <code>Host:</code> header, making this directive unnecessary.</p></div>
 
 <h3>See also</h3>
 <ul>
-<li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
+<li><a href="../vhosts/name-based.html">Name-based Virtual Host Support</a></li>
+<li><a href="../vhosts/examples.html#serverpath">ServerPath example</a></li>
 </ul>
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
index 97ffd61a47607391ef5baf0379867b494b69009d..b32454e92625426c41168e732fdc974dacfaa140 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.de.xsl"?>
-<!-- English Revision: 344972:1933590 (outdated) -->
+<!-- English Revision: 344972:1933666 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index dec5f8e325908a850995638d5c8b76e3b1b14f7c..12f5b7234a2c72ba12438017bdffa49a60edd50f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.es.xsl"?>
-<!-- English Revision: 1741251:1933590 (outdated) -->
+<!-- English Revision: 1741251:1933666 (outdated) -->
 <!-- Translated by Luis Gil de Bernabé Pfeiffer lgilbernabe[AT]apache.org -->
 <!-- Reviewed by Sergio Ramos-->
 <!--
index d667f63b0d39f7d672138ab2edcc2fd4d3a5e502..7525c354d526a199040874eba357fcf5a9d4667b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1932811:1933590 (outdated) -->
+<!-- English Revision: 1932811:1933666 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
index 27701a3bede3f009fb0be8e8f51913672174f301..51bf4e037bfd8b9814737e02f15207c735caafc2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 669847:1933590 (outdated) -->
+<!-- English Revision: 669847:1933666 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 0908616469e510e86041d8777906494a3f244350..2cb59603f75f800af314e49e1b0fa37487bb950a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
-<!-- English Revision: 1302855:1933590 (outdated) -->
+<!-- English Revision: 1302855:1933666 (outdated) -->
 <!-- =====================================================
  Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
    Reviewed by: Orhan Berent <berent belgeler.org>
index 248e5fe72321cc3ef267a85c103c6cb7f2a9ceed..07a1d6e8f541b351ac0dbd1b5e225b1fe48dfd08 100644 (file)
 
 Alias "/secure" "/webpages/secure"
 &lt;Directory "/webpages/secure"&gt;
-    Require all granted
-
-    AuthBasicProvider file
-
     AuthType Basic
-    AuthName LDAP_Protected_Place
+    AuthName "LDAP Protected"
+    AuthBasicProvider ldap
+    AuthLDAPUrl "ldap://ldap.host/o=ctx"
 
     #implied OR operation
     Require ldap-group-alias1
index 39586a53fbb72f8b6d104def655a9059c7a34217..df17ab578135b964fe343e79b071840c9c4ceaa6 100644 (file)
@@ -29,6 +29,8 @@
 <p><span>Langues Disponibles: </span><a href="../en/mod/mod_authz_core.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
 <a href="../fr/mod/mod_authz_core.html" title="Français">&nbsp;fr&nbsp;</a></p>
 </div>
+<div class="outofdate">Cette traduction peut être périmée. Vérifiez la version
+            anglaise pour les changements récents.</div>
 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Socle d'autorisation</td></tr>
 <tr><th><a href="module-dict.html#Status">Statut:</a></th><td>Base</td></tr>
 <tr><th><a href="module-dict.html#ModuleIdentifier">Identificateur de Module:</a></th><td>authz_core_module</td></tr>
index fa668bf7119add7a91840b7ce760574c40ed4a06..32781d34249a344636379ae0ed638dc9f59b5e71 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision:1888002 -->
+<!-- English Revision: 1888002:1933649 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
index 5023ce74e38c5033f07d45090b67a59a8e15fea6..248771933a9e8b2688556aaea1c42b82a23108ab 100644 (file)
@@ -8,6 +8,6 @@
 
   <variants>
     <variant>en</variant>
-    <variant>fr</variant>
+    <variant outdated="yes">fr</variant>
   </variants>
 </metafile>
index 2dc3a995a9883dfb8c6340fcd4e0ab712ad6a634..39db81becd67284291fdd9a451f39c25b8d0fac7 100644 (file)
@@ -1112,7 +1112,8 @@ through</td></tr>
     from being escaped.</div>
 
     <p>When used inside a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> section, the first argument is omitted and the local
-    directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>. The same will occur inside a
+    directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>. When used outside a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> or <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section, the
+    <var>path</var> argument is required. The same will occur inside a
     <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section;
     however, ProxyPass does not interpret the regexp as such, so it is necessary
     to use <code class="directive">ProxyPassMatch</code> in this situation instead.</p>
@@ -1822,7 +1823,8 @@ ProxyPassMatch   "^/(.*\.gif)$" "http://backend.example.com/$1"</pre>
     to reverse-proxy a subdirectory.</p>
 
     <p>When used inside a <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section, the first argument is omitted and the
-    regexp is obtained from the <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code>.</p>
+    regexp is obtained from the <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code>. When used outside a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> or <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section, the
+    <var>regex</var> argument is required.</p>
 
     <p>If you require a more flexible reverse-proxy configuration, see the
     <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive with the
@@ -1937,7 +1939,8 @@ ProxyPassReverseCookiePath  "/"  "/mirror/foo/"</pre>
     URL.</p>
 
     <p>When used inside a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> section, the first argument is omitted and the local
-    directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>. The same occurs inside a <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section, but will probably not work as
+    directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>. When used outside a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> or <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section, the
+    <var>path</var> argument is required. The same occurs inside a <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section, but will probably not work as
     intended, as ProxyPassReverse will interpret the regexp literally as a
     path; if needed in this situation, specify the ProxyPassReverse outside
     the section or in a separate <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> section.</p>
index 557ea001fdbc5d788b4a363fe9f37c6486b6651c..7997aba70122980e12fbc72dd09adcc211cff18b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1932769:1933602 (outdated) -->
+<!-- English Revision: 1932769:1933645 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
index 4322f53a729fc9e20de2f53429bd34a8921efd1b..eba79bc41608b9a4b6adb57df697f0a6a2ff8e10 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 344971:1933602 (outdated) -->
+<!-- English Revision: 344971:1933645 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index a4f5cdc18eb487c9222225fd7ad8846f280127a5..215c986c2704273a9c7100f01f03e11b92046df5 100644 (file)
@@ -1103,7 +1103,8 @@ RewriteRule  "^/$"                 "/homepage.std.html"     [L]</pre>
       URL after the hostname and port, and before the query string (e.g. "/app1/index.html").
       This is the (%-decoded) <a href="directive-dict.html#Syntax">URL-path</a>.</p></li>
 
-      <li><p>In per-directory context (<code class="directive"><a href="../mod/core.html#directory">Directory</a></code> and .htaccess),
+      <li><p>In <a class="glossarylink" href="../glossary.html#perdirectory" title="see glossary">per-directory context</a>
+      (<code class="directive"><a href="../mod/core.html#directory">Directory</a></code> and .htaccess),
       the <em>Pattern</em> is matched against only a partial path, for example a request
       of "/app1/index.html" may result in comparison against "app1/index.html" 
       or "index.html" depending on the directory-path for which the
@@ -1128,17 +1129,19 @@ RewriteRule  "^/$"                 "/homepage.std.html"     [L]</pre>
 </ul>
 </div>
 
-<div class="note"><h3>Per-directory Rewrites</h3>
+<div class="note"><h3><a class="glossarylink" href="../glossary.html#perdirectory" title="see glossary">Per-directory</a> Rewrites</h3>
 <ul>
 <li>The rewrite engine may be used in <a href="../howto/htaccess.html">.htaccess</a> files and in <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code> sections, with some additional
 complexity.</li>
 
 <li>To enable the rewrite engine in this context, you need to set
 "<code>RewriteEngine On</code>" <strong>and</strong>
-"<code>Options FollowSymLinks</code>" must be enabled. If your
-administrator has disabled override of <code>FollowSymLinks</code> for
-a user's directory, then you cannot use the rewrite engine. This
-restriction is required for security reasons.</li>
+the <code>FollowSymLinks</code> or <code>SymLinksIfOwnerMatch</code>
+<code class="directive"><a href="../mod/core.html#options">Options</a></code> must be enabled. If your
+administrator has disabled override of these options for a user's
+directory via <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code>, the
+rewrite engine cannot be used in <code>.htaccess</code> files in that
+directory.</li>
 
 <li>See the <code class="directive"><a href="#rewritebase">RewriteBase</a></code>
 directive for more information regarding what prefix will be added back to
@@ -1228,8 +1231,8 @@ cannot use <code>$N</code> in the substitution string!
         you specify a <em>Substitution</em> string of
         <code>/www/file.html</code>, then this will be treated as a
         URL-path <em>unless</em> a directory named <code>www</code>
-        exists at the root or your file-system (or, in the case of
-        using rewrites in a <code>.htaccess</code> file, relative to
+        exists at the root of your file-system (or, in the case of
+        per-directory rewrites, relative to
         your document root), in which case it will
         be treated as a file-system path. If you wish other
         URL-mapping directives (such as <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code>) to be applied to the
@@ -1276,9 +1279,10 @@ cannot use <code>$N</code> in the substitution string!
 
       <p>Back-references are identifiers of the form
       <code>$</code><strong>N</strong>
-      (<strong>N</strong>=0..9), 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
+      (<strong>N</strong>=0..9). <code>$0</code> refers to the
+      entire string matched by the <em>Pattern</em>, while
+      <code>$1</code>..<code>$9</code> refer to the corresponding
+      captured groups from the matched <em>Pattern</em>. The server-variables are the same
       as for the <em>TestString</em> of a
       <code class="directive"><a href="#rewritecond">RewriteCond</a></code>
       directive. The mapping-functions come from the
@@ -1388,8 +1392,7 @@ cannot use <code>$N</code> in the substitution string!
 <tr>
         <td>last|L</td>
         <td>Stop the rewriting process immediately and don't apply any
-        more rules. Especially note caveats for per-directory and
-        .htaccess context (see also the END flag). <em><a href="../rewrite/flags.html#flag_l">details ...</a></em></td>
+        more rules. Especially note caveats for per-directory context (see also the END flag). <em><a href="../rewrite/flags.html#flag_l">details ...</a></em></td>
     </tr>
 <tr class="odd">
         <td>next|N</td>
index 652a7f463d7f3bfa92bba308d0c65b93b3e9cd4b..70a20e05a5bbd40958f9b3812bf1e31141d3cd77 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1932387:1933562 (outdated) -->
+<!-- English Revision: 1932387:1933662 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
index c2e8265e69d7a1b1c4b428de8eeac7cadab8b23b..54cfd68654242f7efecb988907331f30f55de51d 100644 (file)
@@ -350,15 +350,18 @@ directive.</p>
 <div class="section">
 <h2><a name="authzproviders" id="authzproviders">Authorization providers for use with Require</a> <a title="Permanent link" href="#authzproviders" class="permalink">&para;</a></h2>
 
-  <p><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> provides a few authentication providers for use
-  with <code class="module"><a href="../mod/mod_authz_core.html">mod_authz_core</a></code>'s
+  <p><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> provides the following authorization providers
+  for use with <code class="module"><a href="../mod/mod_authz_core.html">mod_authz_core</a></code>'s
   <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directive.</p>
 
   <h3><a name="reqssl" id="reqssl">Require ssl</a></h3>
 
     <p>The <code>ssl</code> provider denies access if a connection is not
-       encrypted with SSL. This is similar to the
-       <code class="directive">SSLRequireSSL</code> directive.</p>
+       encrypted with SSL. Unlike the
+       <code class="directive">SSLRequireSSL</code> directive, this can be
+       combined with other <code class="directive">Require</code> directives in
+       <code class="directive"><a href="../mod/mod_authz_core.html#requireany">RequireAny</a></code> or
+       <code class="directive"><a href="../mod/mod_authz_core.html#requireall">RequireAll</a></code> blocks.</p>
 
     <pre class="prettyprint lang-config">Require ssl</pre>
 
@@ -367,8 +370,8 @@ directive.</p>
 
   <h3><a name="reqverifyclient" id="reqverifyclient">Require ssl-verify-client</a></h3>
 
-    <p>The <code>ssl</code> provider allows access if the user is
-       authenticated with a valid client certificate. This is only
+    <p>The <code>ssl-verify-client</code> provider allows access if the
+       user is authenticated with a valid client certificate. This is only
        useful if <code>SSLVerifyClient optional</code> is in effect.</p>
 
     <p>The following example grants access if the user is authenticated
index a5e772a579af5bf9c5341e205a23d7b7a59b3e77..82e32b3ea06be3530c4acc1a1a5ec3b2d811af03 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.es.xsl"?>
-<!-- English Revision: 1817381:1933555 (outdated) -->
+<!-- English Revision: 1817381:1933647 (outdated) -->
 <!-- Spanish Translation: Daniel Ferradal <dferradal@apache.org> -->
 <!-- Updated and reviewed: Luis Gil de bernabe <lgilbernabe@apache.org> -->
 
index 21e15262656ff114ba8dc42cba17d5123287433a..d02426a102ff6782e1a8068345c596da12abd23a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1933097:1933555 (outdated) -->
+<!-- English Revision: 1933097:1933647 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
index f2839af7d9f2e7323ce249188c5312bc5316950f..fe7030ab4db6a259a0022a0c1e49fb12e80711be 100644 (file)
@@ -503,6 +503,26 @@ simultaneously</td></tr>
     <code>25</code> (<code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>). Therefore, to increase <code class="directive">MaxRequestWorkers</code> to a value that requires more than 16 processes,
     you must also raise <code class="directive"><a href="#serverlimit">ServerLimit</a></code>.</p>
 
+    <p>For threaded and hybrid MPMs, <code class="directive">MaxRequestWorkers</code>
+    must be at least as large as
+    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>, and
+    should be an integer multiple of
+    <code class="directive"><a href="#threadsperchild">ThreadsPerChild</a></code>. If it
+    is not a multiple, the server will round it down to the nearest
+    multiple at startup and log a warning.</p>
+
+    <div class="example"><h3>Warning: MaxRequestWorkers too small</h3><p><code>
+    WARNING: MaxRequestWorkers of 10 is less than ThreadsPerChild
+    of 25, increasing to 25. MaxRequestWorkers must be at least as
+    large as the number of threads in a single server.
+    </code></p></div>
+
+    <div class="example"><h3>Warning: MaxRequestWorkers not a multiple of ThreadsPerChild</h3><p><code>
+    WARNING: MaxRequestWorkers of 90 is not an integer multiple of
+    ThreadsPerChild of 25, decreasing to nearest multiple 75, for a
+    maximum of 3 servers.
+    </code></p></div>
+
     <p><code class="directive">MaxRequestWorkers</code> was called
     <code class="directive">MaxClients</code> before version 2.3.13. The old name is still
     supported.</p>
@@ -916,6 +936,11 @@ per child process</td></tr>
     least 1. Values less than 1 will be automatically increased to 1
     and a warning will be logged.</p>
 
+    <p>The value of <code class="directive"><a href="#maxrequestworkers">MaxRequestWorkers</a></code>
+    must be an integer multiple of <code class="directive">ThreadsPerChild</code>.
+    See <code class="directive"><a href="#maxrequestworkers">MaxRequestWorkers</a></code> for
+    details.</p>
+
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="ThreadStackSize" id="ThreadStackSize">ThreadStackSize</a> <a name="threadstacksize" id="threadstacksize">Directive</a> <a title="Permanent link" href="#threadstacksize" class="permalink">&para;</a></h2>
index 7409d42db08e2cc3de8076b351f7410a92506764..01b6b03fb6eeb97102e8e04e5116516e63a8241d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.de.xsl"?>
-<!-- English Revision: 151408:1933599 (outdated) -->
+<!-- English Revision: 151408:1933657 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 69f899b5b11b1e60016502a77c776c8bc86c4956..b4d4af083a0b97b2465696372b58e1d87db29e81 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1933179:1933599 (outdated) -->
+<!-- English Revision: 1933179:1933657 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
index 5191606831586dc9a9bcde29740212e7b3a41188..1743eef0e084348b122545efeb141992ee19b43c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 674934:1933599 (outdated) -->
+<!-- English Revision: 674934:1933657 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index f500b8868c6276fba07ecf4eefa70aab868314d8..c8d1fa492893290b14ec0047387c44f53a4deb25 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
-<!-- English Revision: 1308409:1933599 (outdated) -->
+<!-- English Revision: 1308409:1933657 (outdated) -->
 <!-- =====================================================
  Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
    Reviewed by: Orhan Berent <berent belgeler.org>
index 2617bee132ba7fa42b5d643803af3df5a4196156..7cce682caa521afae32c131f0da065ee5e43e350 100644 (file)
@@ -185,7 +185,7 @@ accomplish.</p>
 
 <p>One case where <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>
 is genuinely useful for proxying is when you want to proxy requests only
-for content that doesn't exist locally  for example, during a migration
+for content that doesn't exist locally - for example, during a migration
 from one server to another:</p>
 
 <pre class="prettyprint lang-config">RewriteCond "%{REQUEST_FILENAME}"       !-f
@@ -261,8 +261,8 @@ and in certain other directives.</p>
     <dt>Discussion:</dt>
 
     <dd>
-      <p>If you need more complex logic  such as serving an
-      alternate image to hotlinkers instead of denying the request  you
+      <p>If you need more complex logic - such as serving an
+      alternate image to hotlinkers instead of denying the request - you
       may need <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. The following examples
       rely on the <code>HTTP_REFERER</code> header, which is optional
       and can be spoofed. The <code>!^$</code> condition allows
@@ -439,7 +439,7 @@ seems like the right approach.</p>
       <p>Use <code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code>, which provides a
       flexible and featureful load-balancing solution. It supports
       several balancing algorithms, session stickiness, health checks,
-      and dynamic configuration via the Balancer Manager  none of which
+      and dynamic configuration via the Balancer Manager - none of which
       are possible with a <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> approach.</p>
 
 <pre class="prettyprint lang-config">&lt;Proxy "balancer://mycluster"&gt;
index c9d0cefdb69d74e4feb3890dc6e68f892cc3293e..ac9084b0d60e20dd75b5d35bf0bb28a3aca0b761 100644 (file)
@@ -191,7 +191,7 @@ accomplish.</p>
 
 <p>One case where <directive module="mod_rewrite">RewriteRule</directive>
 is genuinely useful for proxying is when you want to proxy requests only
-for content that doesn't exist locally  for example, during a migration
+for content that doesn't exist locally - for example, during a migration
 from one server to another:</p>
 
 <highlight language="config">
@@ -271,8 +271,8 @@ SetEnvIf Referer example\.com localreferer
     <dt>Discussion:</dt>
 
     <dd>
-      <p>If you need more complex logic  such as serving an
-      alternate image to hotlinkers instead of denying the request  you
+      <p>If you need more complex logic - such as serving an
+      alternate image to hotlinkers instead of denying the request - you
       may need <module>mod_rewrite</module>. The following examples
       rely on the <code>HTTP_REFERER</code> header, which is optional
       and can be spoofed. The <code>!^$</code> condition allows
@@ -455,7 +455,7 @@ seems like the right approach.</p>
       <p>Use <module>mod_proxy_balancer</module>, which provides a
       flexible and featureful load-balancing solution. It supports
       several balancing algorithms, session stickiness, health checks,
-      and dynamic configuration via the Balancer Manager  none of which
+      and dynamic configuration via the Balancer Manager - none of which
       are possible with a <module>mod_rewrite</module> approach.</p>
 
 <highlight language="config">
index 93c8a00848b33f406ec2bb06be9d98f2eeb41f2c..75ab8358642cd79db71d23eee6de9cc6c688573a 100644 (file)
@@ -32,6 +32,9 @@
 <a href="../tr/rewrite/htaccess.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a> |
 <a href="../zh-cn/rewrite/htaccess.html" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
 </div>
+<div class="outofdate">Diese &#220;bersetzung ist m&#246;glicherweise
+            nicht mehr aktuell. Bitte pr&#252;fen Sie die englische Version auf
+            die neuesten &#196;nderungen.</div>
 
 
 <p>Dieses Dokument erg&#228;nzt die <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
index 548dd98e2028214ee587417ecd1b9796b1eca23d..bd5dfb1e7c323b9d3b64f4a1a01ad2cb90be79a0 100644 (file)
 </div>
 
 
-<p>This document supplements the <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
-<a href="../mod/mod_rewrite.html">reference documentation</a>. It describes
-the way that the rules change when you use <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> in .htaccess files,
-and how to deal with these changes.</p>
+<p>Using <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> in <code>.htaccess</code> files
+is one of the most common - and most confusing -
+<a class="glossarylink" href="../glossary.html#perdirectory" title="see glossary">per-directory</a> configurations.
+This document explains the key differences between using rewrite
+rules in server configuration versus <code>.htaccess</code> files,
+and provides practical guidance for avoiding the most common pitfalls.</p>
+
+<p>For the low-level technical details of how <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
+processes rules in per-directory context, see the
+<a href="tech.html#InternalAPI">Technical Details</a> document.</p>
 
 </div>
-<div id="quickview"><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module documentation</a></li><li><a href="intro.html">mod_rewrite introduction</a></li><li><a href="remapping.html">Redirection and remapping</a></li><li><a href="vhosts.html">Virtual hosts</a></li><li><a href="proxy.html">Proxying</a></li><li><a href="rewritemap.html">Using RewriteMap</a></li><li><a href="advanced.html">Advanced techniques</a></li><li><a href="avoid.html">When not to use mod_rewrite</a></li><li><a href="#comments_section">Comments</a></li></ul></div>
-</div>
+<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#prerequisites">Prerequisites: AllowOverride</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#path-stripping">What URL does the rule see?</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#rewritebase">When you need RewriteBase</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#loops">The [L] flag and looping</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#rewritemap-restriction">RewriteMap cannot be
+declared in .htaccess</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#inheritance">Rule inheritance with RewriteOptions</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#debugging">Debugging .htaccess rewrite rules</a></li>
+</ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module documentation</a></li><li><a href="intro.html">mod_rewrite introduction</a></li><li><a href="remapping.html">Redirection and remapping</a></li><li><a href="vhosts.html">Virtual hosts</a></li><li><a href="rewritemap.html">Using RewriteMap</a></li><li><a href="avoid.html">When not to use mod_rewrite</a></li><li><a href="flags.html">RewriteRule Flags</a></li><li><a href="tech.html">Technical details</a></li><li><a href="#comments_section">Comments</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="prerequisites" id="prerequisites">Prerequisites: AllowOverride</a> <a title="Permanent link" href="#prerequisites" class="permalink">&para;</a></h2>
+
+<p>Before <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> directives in a
+<code>.htaccess</code> file will be processed at all, the server
+configuration must permit them. This requires:</p>
+
+<pre class="prettyprint lang-config">&lt;Directory "/var/www/htdocs"&gt;
+    AllowOverride FileInfo
+&lt;/Directory&gt;</pre>
+
+
+<p>Without at least <code>AllowOverride FileInfo</code> (or
+<code>AllowOverride All</code>), any <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
+directives in <code>.htaccess</code> files are silently ignored.
+If your rules don't appear to be doing anything, this is the first
+thing to check.</p>
+
+<p>Additionally, either <code>Options FollowSymLinks</code> or
+<code>Options SymLinksIfOwnerMatch</code> must be enabled for the
+directory in question. Because a
+<code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> can map a URL
+to an arbitrary filesystem path - functionally equivalent to a symbolic
+link - <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> refuses to operate in per-directory
+context unless one of these options is set. Without it, you will see
+the following error:</p>
+
+<div class="example"><p><code>
+AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off,
+so the RewriteRule directive is also forbidden due to its similar
+ability to circumvent directory restrictions
+</code></p></div>
+
+<p>This restriction applies to both <code>.htaccess</code> files and
+<code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code> blocks.</p>
+
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="path-stripping" id="path-stripping">What URL does the rule see?</a> <a title="Permanent link" href="#path-stripping" class="permalink">&para;</a></h2>
+
+<p>In server or virtualhost context, the
+<code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> pattern is
+matched against the full URL-path, starting with a leading slash.
+In <code>.htaccess</code> context, the directory prefix is
+<strong>stripped</strong>.</p>
+
+<p>For example, if your <code>.htaccess</code> is in
+<code>/var/www/htdocs/app/</code> and a request comes in for
+<code>/app/products/widget</code>, the RewriteRule sees only
+<code>products/widget</code> - no leading slash, no
+<code>/app/</code> prefix.</p>
+
+<p>This means you must write your patterns differently depending on
+where the rule lives:</p>
+
+    <table class="bordered">
+        <tr>
+            <th>Location of rule</th>
+            <th>Rule</th>
+        </tr>
+        <tr>
+            <td>VirtualHost section</td>
+            <td><code>RewriteRule "^/app/products/(.+)$" "/app/shop.php?item=$1"</code></td>
+        </tr>
+        <tr>
+            <td>.htaccess in /var/www/htdocs/app/</td>
+            <td><code>RewriteRule "^products/(.+)$" "shop.php?item=$1"</code></td>
+        </tr>
+    </table>
+
+<p>Note that the <code>.htaccess</code> version has no leading slash
+in either the pattern or the substitution. This is the single most
+common source of confusion with per-directory rewriting.</p>
+
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="rewritebase" id="rewritebase">When you need RewriteBase</a> <a title="Permanent link" href="#rewritebase" class="permalink">&para;</a></h2>
+
+<p>When <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> makes a substitution in
+<code>.htaccess</code> context, it needs to turn the relative result
+back into a full URL-path. The
+<code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code> directive tells
+it what prefix to prepend.</p>
+
+<p>By default, <code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code>
+is set to the physical directory path of the <code>.htaccess</code>
+file. In most cases, this does the right thing, and you don't need
+to set it explicitly. But there are situations where you do:</p>
+
+<ul>
+<li><strong>Alias or symlink:</strong> If the directory is reached via
+an <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code> or a symlink, the
+URL path and the filesystem path differ, and
+<code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code> must be set
+to the URL path.</li>
+
+<li><strong>Subdirectory applications:</strong> A common pattern for
+PHP frameworks is to place a <code>.htaccess</code> in a subdirectory
+(say, <code>/var/www/htdocs/myapp/</code>) and route all requests to
+a front controller:</li>
+</ul>
+
+<pre class="prettyprint lang-config"># In /var/www/htdocs/myapp/.htaccess
+RewriteEngine On
+RewriteBase "/myapp/"
+RewriteCond "%{REQUEST_FILENAME}" !-f
+RewriteCond "%{REQUEST_FILENAME}" !-d
+RewriteRule "^(.*)$" "index.php" [L]</pre>
+
+
+<div class="note">For this particular use case - routing all unmatched
+requests to a front controller - the
+<a href="remapping.html#fallback-resource">FallbackResource</a> directive
+is a simpler and more efficient alternative to mod_rewrite.</div>
+
+<p>Without the <code>RewriteBase "/myapp/"</code> line, the rewritten
+URL might resolve incorrectly, because <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
+would prepend the filesystem path rather than the URL path.</p>
+
+<p>If you're using absolute URLs (starting with <code>/</code> or
+<code>http://</code>) in your substitutions,
+<code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code> has no effect
+- it only applies to relative substitutions.</p>
+
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="loops" id="loops">The [L] flag and looping</a> <a title="Permanent link" href="#loops" class="permalink">&para;</a></h2>
+
+<p>In server context, the <code>[L]</code> flag means "stop processing
+the ruleset." In <code>.htaccess</code> context, it means something
+subtly different: "stop processing the ruleset <em>for this pass</em>."
+After the substitution is made, Apache re-processes the request from
+the top - including re-applying the <code>.htaccess</code> rules.
+This can lead to infinite loops.</p>
+
+<p>Consider this rule:</p>
+
+<pre class="prettyprint lang-config"># In .htaccess - this may loop!
+RewriteRule "^(.*)$" "/index.php?q=$1" [L]</pre>
+
+
+<p>On the first pass, a request for <code>/hello</code> is rewritten to
+<code>/index.php?q=hello</code>. Then the request is re-processed, and
+now <code>index.php</code> matches <code>^(.*)$</code> again, rewriting
+to <code>/index.php?q=index.php</code>. This continues until Apache
+hits its internal redirect limit and returns a 500 error. You will see
+the following in the error log:</p>
+
+<div class="example"><p><code>
+AH00124: Request exceeded the limit of 10 internal redirects due to
+probable configuration error. Use 'LimitInternalRecursion' to increase
+the limit if necessary. Use 'LogLevel debug' to get a backtrace.
+</code></p></div>
+
+<p>There are several ways to break the loop:</p>
+
+<p><strong>Option 1: Use the [END] flag</strong> (recommended)</p>
+
+<pre class="prettyprint lang-config">RewriteRule "^(.*)$" "/index.php?q=$1" [END]</pre>
+
+
+<p>The <code>[END]</code> flag (available since Apache 2.3.9) stops
+<em>all</em> further rewrite processing, including subsequent passes.
+It is the cleanest way to prevent loops.</p>
+
+<p><strong>Option 2: Add a condition to skip already-rewritten URLs</strong></p>
+
+<pre class="prettyprint lang-config">RewriteCond "%{REQUEST_FILENAME}" !-f
+RewriteCond "%{REQUEST_FILENAME}" !-d
+RewriteRule "^(.*)$" "/index.php?q=$1" [L]</pre>
+
+
+<p>Since <code>index.php</code> exists as a file, the
+<code>!-f</code> condition causes the rule to be skipped on the second
+pass.</p>
+
+<p><strong>Option 3: Check THE_REQUEST</strong></p>
+
+<pre class="prettyprint lang-config">RewriteCond "%{THE_REQUEST}" "!index\.php"
+RewriteRule "^(.*)$" "/index.php?q=$1" [L]</pre>
+
+
+<p>The <code>%{THE_REQUEST}</code> variable contains the original
+request line as sent by the client, which is not modified by
+<code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. Checking it prevents the rule from
+matching rewritten URLs.</p>
+
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="rewritemap-restriction" id="rewritemap-restriction">RewriteMap cannot be
+declared in .htaccess</a> <a title="Permanent link" href="#rewritemap-restriction" class="permalink">&para;</a></h2>
+
+<p>The <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> directive
+can only be declared in server or virtualhost context - not in
+<code>.htaccess</code> files or
+<code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code> blocks.
+However, once a map is declared in the server configuration, you
+<em>can</em> use it from a <code>.htaccess</code> file:</p>
+
+<pre class="prettyprint lang-config"># In httpd.conf or a VirtualHost
+RewriteMap product2id "txt:/etc/apache2/productmap.txt"</pre>
+
+
+<pre class="prettyprint lang-config"># In .htaccess - using the map declared above
+RewriteEngine On
+RewriteRule "^product/(.+)$" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT]</pre>
+
+
+<p>This restriction exists because <code>.htaccess</code> files are
+parsed on every request, and map initialization (especially for
+<code>dbm:</code>, <code>dbd:</code>, and <code>prg:</code> map types)
+would be prohibitively expensive to repeat each time.</p>
+
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="inheritance" id="inheritance">Rule inheritance with RewriteOptions</a> <a title="Permanent link" href="#inheritance" class="permalink">&para;</a></h2>
+
+<p>By default, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> rules are <strong>not
+inherited</strong> by subdirectories. If you define rules in
+<code>/var/www/htdocs/.htaccess</code>, they apply to that directory
+only. A <code>.htaccess</code> file in a subdirectory starts with
+an empty ruleset, unless you explicitly enable inheritance.</p>
+
+<p>The <code class="directive"><a href="../mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></code>
+directive controls this behavior:</p>
+
+<dl>
+<dt><code>RewriteOptions Inherit</code></dt>
+<dd>Rules from the parent context are appended to the current ruleset.
+The child's rules are processed first, then the parent's. Use this
+when a subdirectory needs to add its own rules while keeping the
+parent's rules active.</dd>
+
+<dt><code>RewriteOptions InheritBefore</code></dt>
+<dd>Like <code>Inherit</code>, but the parent's rules are processed
+<em>before</em> the child's. This is useful when the parent defines
+a front-controller pattern and the child needs to add exceptions.
+Available since Apache 2.4.8.</dd>
+
+<dt><code>RewriteOptions InheritDown</code></dt>
+<dd>Set this in the parent context to force all child contexts to
+inherit the parent's rules, without requiring each child to specify
+<code>Inherit</code>. Available since Apache 2.4.8.</dd>
+
+<dt><code>RewriteOptions InheritDownBefore</code></dt>
+<dd>Like <code>InheritDown</code>, but forces the parent's rules to
+run before the child's. Available since Apache 2.4.8.</dd>
+
+<dt><code>RewriteOptions IgnoreInherit</code></dt>
+<dd>Set this in a child context to opt out of inheritance that was
+forced by a parent's <code>InheritDown</code>.
+Available since Apache 2.4.8.</dd>
+
+<dt><code>RewriteOptions MergeBase</code></dt>
+<dd>When inheritance is enabled, the <code>RewriteBase</code> from
+each context is used for rules defined in that context, rather than
+applying the child's <code>RewriteBase</code> to all inherited rules.
+Available since Apache 2.4.26.</dd>
+</dl>
+
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="debugging" id="debugging">Debugging .htaccess rewrite rules</a> <a title="Permanent link" href="#debugging" class="permalink">&para;</a></h2>
+
+<p>When <code>.htaccess</code> rules are not doing what you expect,
+the rewrite log is your most important tool. Enable it at the
+appropriate trace level:</p>
+
+<pre class="prettyprint lang-config">LogLevel alert rewrite:trace3</pre>
+
+
+<p>This produces detailed output in the error log showing exactly
+how each rule is processed - what pattern was matched against,
+whether conditions succeeded or failed, and what substitution was
+made. The per-directory context and path stripping behavior will be
+visible in these log entries.</p>
+
+<div class="warning">Do not leave trace-level logging enabled in
+production. It generates a large volume of output and will affect
+performance.</div>
+
+</div></div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../de/rewrite/htaccess.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
 <a href="../en/rewrite/htaccess.html" title="English">&nbsp;en&nbsp;</a> |
index b3f503836662180ecbc7e49f857a0d903a429bf7..09adeebe68bdb4a106e4d1564e4058c7ac3e0544 100644 (file)
 <a href="../tr/rewrite/htaccess.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a> |
 <a href="../zh-cn/rewrite/htaccess.html" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
 </div>
+<div class="outofdate">Esta traducción podría estar
+            obsoleta. Consulte la versión en inglés de la
+            documentación para comprobar si se han producido cambios
+            recientemente.</div>
 
 
 <p>Este documento complementa la <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
index 29a08ea6e27a10845780bdd74795f1b5795a2ac5..b0a883f4657fdd8afcbadffc29f2af1f39470723 100644 (file)
@@ -32,6 +32,8 @@
 <a href="../tr/rewrite/htaccess.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a> |
 <a href="../zh-cn/rewrite/htaccess.html" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
 </div>
+<div class="outofdate">Cette traduction peut être périmée. Vérifiez la version
+            anglaise pour les changements récents.</div>
 
 
 <p>Ce document est un complément de la <a href="../mod/mod_rewrite.html">documentation de référence</a> du module
index 9be65affd56ab68a5f2cba475a1ef0b3c8aaa7a5..e9d3af70e30bdd963ec5b13faba081e92f62b6c8 100644 (file)
 <a href="../tr/rewrite/htaccess.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a> |
 <a href="../zh-cn/rewrite/htaccess.html" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
 </div>
+<div class="outofdate">この日本語訳はすでに古くなっている
+            可能性があります。
+            最近更新された内容を見るには英語版をご覧下さい。
+        </div>
 
 
 <p>このドキュメントは <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
index 6ee5d95995900fa1855c0a1ef0c2ee1f51ec1861..1ac38b25af77d6ce0c25f503b2c8d8623a32489f 100644 (file)
@@ -32,6 +32,8 @@
 <a href="../tr/rewrite/htaccess.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a> |
 <a href="../zh-cn/rewrite/htaccess.html" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
 </div>
+<div class="outofdate">ÀÌ ¹®¼­´Â ÃÖ½ÅÆÇ ¹ø¿ªÀÌ ¾Æ´Õ´Ï´Ù.
+            ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼­¸¦ Âü°íÇϼ¼¿ä.</div>
 
 
 <p>&#65533;&#65533; ë¬¸ì&#65533;&#65533;&#65533;&#65533; <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
index 696bc7ce7f9fc6d5d86fb5703edd7ebec8871644..05adcf9348e01f06ee103d91ca6bb761a8c97761 100644 (file)
@@ -32,6 +32,7 @@
 <a href="../tr/rewrite/htaccess.html" title="Türkçe">&nbsp;tr&nbsp;</a> |
 <a href="../zh-cn/rewrite/htaccess.html" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&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>Bu belge, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
index 08863738880738163872911a4b0a3fa1f9258a80..c3988a56d6a0eb058493e1754ccb4484bd14eaf7 100644 (file)
@@ -32,6 +32,7 @@
 <a href="../tr/rewrite/htaccess.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a> |
 <a href="../zh-cn/rewrite/htaccess.html" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
 </div>
+<div class="outofdate">此翻译可能过期。要了解最近的更改,请阅读英文版。</div>
 
 
 <p>本文档是 <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
index 070e2828708b284f49865f2aa5261f0ffb3753c9..d7008cc6c03a3f37195cd4ce24fc72dd6602e3ef 100644 (file)
@@ -28,7 +28,7 @@
 <summary>
 
 <p>Using <module>mod_rewrite</module> in <code>.htaccess</code> files
-is one of the most common — and most confusing —
+is one of the most common - and most confusing -
 <glossary ref="perdirectory">per-directory</glossary> configurations.
 This document explains the key differences between using rewrite
 rules in server configuration versus <code>.htaccess</code> files,
@@ -70,8 +70,8 @@ thing to check.</p>
 <code>Options SymLinksIfOwnerMatch</code> must be enabled for the
 directory in question. Because a
 <directive module="mod_rewrite">RewriteRule</directive> can map a URL
-to an arbitrary filesystem path  functionally equivalent to a symbolic
-link  <module>mod_rewrite</module> refuses to operate in per-directory
+to an arbitrary filesystem path - functionally equivalent to a symbolic
+link - <module>mod_rewrite</module> refuses to operate in per-directory
 context unless one of these options is set. Without it, you will see
 the following error:</p>
 
@@ -97,7 +97,7 @@ In <code>.htaccess</code> context, the directory prefix is
 <p>For example, if your <code>.htaccess</code> is in
 <code>/var/www/htdocs/app/</code> and a request comes in for
 <code>/app/products/widget</code>, the RewriteRule sees only
-<code>products/widget</code>  no leading slash, no
+<code>products/widget</code> - no leading slash, no
 <code>/app/</code> prefix.</p>
 
 <p>This means you must write your patterns differently depending on
@@ -159,8 +159,8 @@ RewriteCond "%{REQUEST_FILENAME}" !-d
 RewriteRule "^(.*)$" "index.php" [L]
 </highlight>
 
-<note>For this particular use case  routing all unmatched
-requests to a front controller  the
+<note>For this particular use case - routing all unmatched
+requests to a front controller - the
 <a href="remapping.html#fallback-resource">FallbackResource</a> directive
 is a simpler and more efficient alternative to mod_rewrite.</note>
 
@@ -171,7 +171,7 @@ would prepend the filesystem path rather than the URL path.</p>
 <p>If you're using absolute URLs (starting with <code>/</code> or
 <code>http://</code>) in your substitutions,
 <directive module="mod_rewrite">RewriteBase</directive> has no effect
- it only applies to relative substitutions.</p>
+- it only applies to relative substitutions.</p>
 
 </section>
 
@@ -181,13 +181,13 @@ would prepend the filesystem path rather than the URL path.</p>
 the ruleset." In <code>.htaccess</code> context, it means something
 subtly different: "stop processing the ruleset <em>for this pass</em>."
 After the substitution is made, Apache re-processes the request from
-the top  including re-applying the <code>.htaccess</code> rules.
+the top - including re-applying the <code>.htaccess</code> rules.
 This can lead to infinite loops.</p>
 
 <p>Consider this rule:</p>
 
 <highlight language="config">
-# In .htaccess  this may loop!
+# In .htaccess - this may loop!
 RewriteRule "^(.*)$" "/index.php?q=$1" [L]
 </highlight>
 
@@ -246,7 +246,7 @@ matching rewritten URLs.</p>
 declared in .htaccess</title>
 
 <p>The <directive module="mod_rewrite">RewriteMap</directive> directive
-can only be declared in server or virtualhost context  not in
+can only be declared in server or virtualhost context - not in
 <code>.htaccess</code> files or
 <directive module="core" type="section">Directory</directive> blocks.
 However, once a map is declared in the server configuration, you
@@ -258,7 +258,7 @@ RewriteMap product2id "txt:/etc/apache2/productmap.txt"
 </highlight>
 
 <highlight language="config">
-# In .htaccess  using the map declared above
+# In .htaccess - using the map declared above
 RewriteEngine On
 RewriteRule "^product/(.+)$" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT]
 </highlight>
@@ -328,7 +328,7 @@ LogLevel alert rewrite:trace3
 </highlight>
 
 <p>This produces detailed output in the error log showing exactly
-how each rule is processed  what pattern was matched against,
+how each rule is processed - what pattern was matched against,
 whether conditions succeeded or failed, and what substitution was
 made. The per-directory context and path stripping behavior will be
 visible in these log entries.</p>
index dfec6d9e24a924b71d24be00fa47256c208be97a..789bc72b945694cb424b57b422d14ffd4c449fea 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.de.xsl"?>
-<!-- English Revision: 1933067 -->
+<!-- English Revision: 1933067:1933671 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 59d25228ee6e72aaa0478cb3d2dc07b2f95750e5..e4142a95aca5ce0e4f739c5b7c42bc3c76c36340 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.es.xsl"?>
-<!-- English Revision: 1933067 -->
+<!-- English Revision: 1933067:1933671 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 1411915f806a93c0aa4ad3e05de69df9da19837f..cccadc2f2d0721752b76b8543c8ddede5257f398 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1933067 -->
+<!-- English Revision: 1933067:1933671 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
index 446389f9323116b46e27f13248b93916677c3893..4a8110fc7d7d464588224bc252142a4d4ef446c8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 1933067 -->
+<!-- English Revision: 1933067:1933671 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 0c9841774b27b2c92347df59198b8f583a84790d..aa96e69ea5386cf489fe192421fd05b7afe30016 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='EUC-KR' ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
-<!-- English Revision: 1933067 -->
+<!-- English Revision: 1933067:1933671 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 04d01a385358f7199472b81c36b3fcd58d6869b1..33b091c226ae109aa00b5d0a43b9f108b4db49ea 100644 (file)
@@ -7,13 +7,13 @@
   <relpath>..</relpath>
 
   <variants>
-    <variant>de</variant>
+    <variant outdated="yes">de</variant>
     <variant>en</variant>
-    <variant>es</variant>
-    <variant>fr</variant>
-    <variant>ja</variant>
-    <variant>ko</variant>
-    <variant>tr</variant>
-    <variant>zh-cn</variant>
+    <variant outdated="yes">es</variant>
+    <variant outdated="yes">fr</variant>
+    <variant outdated="yes">ja</variant>
+    <variant outdated="yes">ko</variant>
+    <variant outdated="yes">tr</variant>
+    <variant outdated="yes">zh-cn</variant>
   </variants>
 </metafile>
index 245b20d5d5a943533b271be25f5712585798aeaa..52afacd459f2dd58de138733752870a05d59bda2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
-<!-- English Revision: 1933067 -->
+<!-- English Revision: 1933067:1933671 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 0031a20f96f3806e0d9096c7ed0ff26d3cd2decb..3005c3793f15810039ce1ce9bf674dc5ae532660 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.zh-cn.xsl"?>
-<!-- English Revision: 1933067 -->
+<!-- English Revision: 1933067:1933671 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index e95fa31d6ce0c441810a74df7da3cf1e172b7a69..9416f2c43adbc7efbf687b9730b859e0ff711f3d 100644 (file)
@@ -90,7 +90,7 @@ exactement comment chaque règle est traitée.</p>
 Ce document n'a pas pour prétention d'être une référence détaillée des
 expressions rationnelles. A cet effet, nous recommandons les <a href="http://pcre.org/pcre.txt">pages de manuel de PCRE</a>, la <a href="http://perldoc.perl.org/perlre.html">page de manuel des
 expressions rationnelles Perl</a>, et l'ouvrage <a href="https://www.oreilly.com/library/view/mastering-regular-expressions/0596528124/">Mastering
-Regular Expressions, by Jeffrey Friedl</a> (la troisième édition date
+Regular Expressions, par Jeffrey Friedl</a> (la troisième édition date
 de 2006, mais la syntaxe des expressions rationnelles n'a pas vraiment
 changé, et cet ouvrage reste la référence en la matière).</p>
 
index 563b8ec0c1391d27a699de5fe7227bdf37e50f50..d9cdd7d7aa6124f6b83a9584355d285fd9f43909 100644 (file)
 <div class="section">
 <h2><a name="hostmatching" id="hostmatching">Virtual Host Matching</a> <a title="Permanent link" href="#hostmatching" class="permalink">&para;</a></h2>
 
-    <p>The server determines which vhost to use for a request as
-    follows:</p>
-
-    <h3><a name="hashtable" id="hashtable">IP address lookup</a></h3>
-
-    <p>When the connection is first received on some address and port,
-    the server looks for all the <code>VirtualHost</code> definitions
-    that have the same IP address and port.</p>
-
-    <p>If there are no exact matches for the address and port, then
-    wildcard (<code>*</code>) matches are considered.</p>
-
-    <p>If no matches are found, the request is served by the
-    main server.</p>
+    <p>The server determines which vhost to use for a request in two
+    phases: an IP-based match when the connection is established,
+    then an optional name-based match when the request is received.</p>
+
+    <h3><a name="hashtable" id="hashtable">Phase 1: IP address and port matching</a></h3>
+
+    <p>When a connection is first received, the server looks up the
+    destination IP address and port in its list of
+    <code>VirtualHost</code> addresses. This lookup follows a strict
+    priority order:</p>
+
+    <table class="bordered"><tr class="header"><th>Priority</th><th>Match type</th><th>Example</th></tr>
+<tr><td>1</td><td>Exact IP address, exact port</td>
+        <td><code>&lt;VirtualHost 10.0.0.1:80&gt;</code></td></tr>
+<tr class="odd"><td>2</td><td>Exact IP address, wildcard port</td>
+        <td><code>&lt;VirtualHost 10.0.0.1:*&gt;</code></td></tr>
+<tr><td>3</td><td>Wildcard address (<code>*</code>), exact port</td>
+        <td><code>&lt;VirtualHost *:80&gt;</code></td></tr>
+<tr class="odd"><td>4</td><td>Wildcard address, wildcard port</td>
+        <td><code>&lt;VirtualHost *:*&gt;</code></td></tr>
+<tr><td>5</td><td>Main server</td>
+        <td>(no matching <code>VirtualHost</code>)</td></tr>
+</table>
+
+    <div class="note"><h3>Important</h3>
+    <p>The server uses the <em>first match found</em> following this
+    priority order. Once a match is found at a given priority level,
+    no lower-priority levels are considered — even if a
+    lower-priority vhost has a <code>ServerName</code> that matches the
+    request's <code>Host</code> header. Name-based matching (Phase 2)
+    only occurs among vhosts that tied at the same priority level.</p>
+    </div>
 
     <p>If there are <code>VirtualHost</code> definitions for
     the IP address, the next step is to decide if we have to
 
     <h3><a name="ipbased" id="ipbased">IP-based vhost</a></h3>
 
-    <p>If there is exactly one <code>VirtualHost</code> directive
-    listing the IP address and port combination that was determined
-    to be the best match, no further actions are performed and
-    the request is served from the matching vhost.</p>
+    <p>If Phase 1 produces exactly one matching
+    <code>VirtualHost</code>, the request is served directly from that
+    vhost with no further matching.</p>
 
     
 
-    <h3><a name="namebased" id="namebased">Name-based vhost</a></h3>
+    <h3><a name="namebased" id="namebased">Phase 2: Name-based matching</a></h3>
 
-    <p>If there are multiple <code>VirtualHost</code> directives listing
-    the IP address and port combination that was determined to be the
-    best match, the "list" in the remaining steps refers to the list of vhosts
-    that matched, in the order they were in the configuration file.</p>
+    <p>If Phase 1 produces multiple <code>VirtualHost</code>
+    definitions at the same priority level, the server performs
+    name-based matching among those vhosts using the
+    <code>Host:</code> header from the request (or the SNI hostname
+    for SSL connections).</p>
 
     <p>If the connection is using SSL, the server supports <a class="glossarylink" href="../glossary.html#servernameindication" title="see glossary">Server Name Indication</a>, and
     the SSL client handshake includes the TLS extension with the
     vhost determines which certificate the server will use for the
     connection.</p>
 
-    <p>If the request contains a <code>Host:</code> header field, the
-    list is searched for the first vhost with a matching
-    <code>ServerName</code> or <code>ServerAlias</code>, and the
-    request is served from that vhost. A <code>Host:</code> header
-    field can contain a port number, but Apache always ignores it and
-    matches against the real port to which the client sent the
-    request.</p>
+    <p>The matching vhosts are searched in the order they appear in
+    the configuration file:</p>
+
+    <ol>
+    <li>The <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> and
+    <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> of each vhost
+    are compared against the hostname from the request.  The first
+    match wins.</li>
+
+    <li>If no <code>ServerName</code> or <code>ServerAlias</code>
+    matches, the <em>first vhost in the list</em> is used.  This is
+    the <em>default name-based vhost</em> for that address and port
+    combination.</li>
+    </ol>
+
+    <p>A <code>Host:</code> header field can contain a port number,
+    but Apache always ignores it and matches against the real port to
+    which the client sent the request.</p>
 
-    <p>The first vhost in the config
-    file with the specified IP address has the highest priority
-    and catches any request to an unknown server name, or a request
-    without a <code>Host:</code> header field (such as a HTTP/1.0
-    request).</p>
+    <p>If the request has no <code>Host:</code> header (such as a
+    HTTP/1.0 request), the first matching vhost is used. If a
+    <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> is configured for
+    any of the matching vhosts and the request URL matches that path,
+    the request is served from that vhost instead.  This is a legacy
+    mechanism for HTTP/1.0 clients; see the
+    <a href="examples.html#serverpath">ServerPath example</a> for
+    details.</p>
 
     
 
     <h3><a name="persistent" id="persistent">Persistent connections</a></h3>
 
-    <p>The <em>IP lookup</em> described above is only done <em>once</em> for a
-    particular TCP/IP session while the <em>name lookup</em> is done on
-    <em>every</em> request during a KeepAlive/persistent
-    connection. In other words, a client may request pages from
-    different name-based vhosts during a single persistent
-    connection.</p>
+    <p>The IP-based lookup (Phase 1) is performed only <em>once</em>
+    for a particular TCP/IP session, while the name-based lookup
+    (Phase 2) is performed on <em>every</em> request during a
+    KeepAlive/persistent connection. In other words, a client may
+    request pages from different name-based vhosts during a single
+    persistent connection.</p>
 
     
 
     relative URI is served by the corresponding main server or
     virtual host. If it does not match, then the URI remains
     untouched and the request is taken to be a proxy request.</p>
-
+    
 
 <h3><a name="observations" id="observations">Observations</a></h3>
 
     <ul>
-      <li>Name-based virtual hosting is a process applied after
-      the server has selected the best matching IP-based virtual
-      host.</li>
+      <li>Name-based virtual hosting is a process applied <em>after</em>
+      the server has narrowed the candidate list via IP-based matching.</li>
 
       <li>If you don't care what IP address the client has connected to, use a
-      "*" as the address of every virtual host, and name-based virtual hosting
+      "<code>*</code>" as the address of every virtual host, and name-based virtual hosting
       is applied across all configured virtual hosts.</li>
 
       <li><code>ServerName</code> and <code>ServerAlias</code>
-      checks are never performed for an IP-based vhost.</li>
+      checks are never performed for an IP-based vhost (one where
+      there is only a single vhost for that IP:port).</li>
 
       <li>Only the ordering of
       name-based vhosts for a specific address set is significant.
-      The one name-based vhosts that comes first in the
+      The one name-based vhost that comes first in the
       configuration file has the highest priority for its
       corresponding address set.</li>
 
index ec9f51e075d723bf1c08b656910c8d552a8c6d32..aebeb4fc20d23e55ff7ba1481e5e03952b75ddcd 100644 (file)
@@ -28,6 +28,8 @@
 <a href="../ko/vhosts/details.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
 <a href="../tr/vhosts/details.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
 </div>
+<div class="outofdate">Cette traduction peut être périmée. Vérifiez la version
+            anglaise pour les changements récents.</div>
 
 
     <p>Ce document vise à expliquer dans le détail comment le serveur
index db9fa5e8e7357d1dbee55121cc9ca333af4a3922..128b364e38cee333b82a56ebff2fee15bbf1e630 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding="UTF-8"?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1777061 -->
+<!-- English Revision: 1777061:1933669 (outdated) -->
 <!-- French translation by Vincent Deffontaines, review by alain B -->
 <!-- Updated by Lucien Gentis -->
 
index fbcfe751865f42207da918382507ad1d3190d3f4..b0c3c4593c31f0596fc77b61fa32e8b58de40e9e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='EUC-KR' ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
-<!-- English Revision: 105989:1777061 (outdated) -->
+<!-- English Revision: 105989:1933669 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 5cd5c305f72320f851b5e47296c04f0f90b121c1..9ec06df893b37c964a3d71d88a34192192220dab 100644 (file)
@@ -8,7 +8,7 @@
 
   <variants>
     <variant>en</variant>
-    <variant>fr</variant>
+    <variant outdated="yes">fr</variant>
     <variant outdated="yes">ko</variant>
     <variant outdated="yes">tr</variant>
   </variants>
index 1c24bfcee9c105839049660b8e13dc0ac9a7b6c9..5a7539cf42464833022531977e913a1cda5f08db 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='UTF-8' ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
-<!-- English Revision: 1301735:1777061 (outdated) -->
+<!-- English Revision: 1301735:1933669 (outdated) -->
 <!-- =====================================================
  Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
    Reviewed by: Orhan Berent <berent belgeler.org>