diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-25 04:41:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-25 04:41:26 +0000 |
commit | 7b31d4f4901cdb89a79f2f7de4a6b8bb637b523b (patch) | |
tree | fdeb0b5ff80273f95ce61607fc3613dff0b9a235 /docs/manual/rewrite/advanced.html | |
parent | Adding upstream version 2.4.38. (diff) | |
download | apache2-upstream.tar.xz apache2-upstream.zip |
Adding upstream version 2.4.59.upstream/2.4.59upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | docs/manual/rewrite/advanced.html | 2 | ||||
-rw-r--r-- | docs/manual/rewrite/advanced.html.en | 36 | ||||
-rw-r--r-- | docs/manual/rewrite/advanced.html.fr.utf8 | 31 |
3 files changed, 40 insertions, 29 deletions
diff --git a/docs/manual/rewrite/advanced.html b/docs/manual/rewrite/advanced.html index 1ecd844..8e5e94f 100644 --- a/docs/manual/rewrite/advanced.html +++ b/docs/manual/rewrite/advanced.html @@ -2,7 +2,7 @@ URI: advanced.html.en Content-Language: en -Content-type: text/html; charset=ISO-8859-1 +Content-type: text/html; charset=UTF-8 URI: advanced.html.fr.utf8 Content-Language: fr diff --git a/docs/manual/rewrite/advanced.html.en b/docs/manual/rewrite/advanced.html.en index e073d27..4a8b8d4 100644 --- a/docs/manual/rewrite/advanced.html.en +++ b/docs/manual/rewrite/advanced.html.en @@ -1,7 +1,7 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> -<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX This file is generated from xml source: DO NOT EDIT @@ -24,7 +24,7 @@ <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">Rewrite</a></div><div id="page-content"><div id="preamble"><h1>Advanced Techniques with mod_rewrite</h1> <div class="toplang"> <p><span>Available Languages: </span><a href="../en/rewrite/advanced.html" title="English"> en </a> | -<a href="../fr/rewrite/advanced.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p> +<a href="../fr/rewrite/advanced.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p> </div> @@ -72,7 +72,7 @@ configuration.</div> <div class="example"><p><code> user1 physical_host_of_user1<br /> user2 physical_host_of_user2<br /> -: : +# ... and so on </code></p></div> <p>We put this into a <code>map.users-to-hosts</code> file. The @@ -94,14 +94,15 @@ http://physical_host_of_user1/u/user/anypath 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> <p>See the <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> - documentation for more discussion of the syntax of this directive.</p> + documentation and the <a href="./rewritemap.html">RewriteMap HowTo</a> + for more discussion of the syntax of this directive.</p> </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> <div class="section"> @@ -127,7 +128,7 @@ RewriteRule "^/u/([^/]+)/?(.*)" "http://${users-to-hosts:$1|server0}/u/$1/$2 <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 +167,8 @@ RewriteRule "^(.+)\.html$" "/regenerate_page.cgi" [PT,L]</pre> 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 +307,10 @@ RewriteRule "^foo\.html$" "foo.night.html"</pre> <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 +331,10 @@ RewriteRule "^/horse/(.*)" "/pony/$1" [E=<strong>rewritten:1</strong>]</pre> <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> @@ -338,8 +342,8 @@ RewriteRule "^/horse/(.*)" "/pony/$1" [E=<strong>rewritten:1</strong>]</pre> </div></div> <div class="bottomlang"> <p><span>Available Languages: </span><a href="../en/rewrite/advanced.html" title="English"> en </a> | -<a href="../fr/rewrite/advanced.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p> -</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> +<a href="../fr/rewrite/advanced.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> <script type="text/javascript"><!--//--><![CDATA[//><!-- var comments_shortname = 'httpd'; var comments_identifier = 'http://httpd.apache.org/docs/2.4/rewrite/advanced.html'; @@ -357,7 +361,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/2.4/rewrite/advanced.htm } })(window, document); //--><!]]></script></div><div id="footer"> -<p class="apache">Copyright 2019 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="apache">Copyright 2024 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- if (typeof(prettyPrint) !== 'undefined') { prettyPrint(); diff --git a/docs/manual/rewrite/advanced.html.fr.utf8 b/docs/manual/rewrite/advanced.html.fr.utf8 index f5d2695..52a3754 100644 --- a/docs/manual/rewrite/advanced.html.fr.utf8 +++ b/docs/manual/rewrite/advanced.html.fr.utf8 @@ -78,7 +78,7 @@ correspondance</a></li><li><a href="access.html">Contrôler l'accès</a></li><li <div class="example"><p><code> utilisateur1 serveur_physique_utilisateur1<br /> utilisateur2 serveur_physique_utilisateur2<br /> -: : +# etc ... </code></p></div> <p>Tout ceci est enregistré dans un fichier @@ -103,13 +103,13 @@ http://serveur_physique_utilisateur1/u/utilisateur/chemin possèdera pas d'entrée dans la table de correspondances :</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> - <p>Voir la documentation de <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> pour une description plus + <p>Voir la documentation de <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> et le <a href="./rewritemap.html">RewriteMap HowTo</a> pour une description plus approfondie de la syntaxe de cette directive.</p> </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> @@ -137,7 +137,7 @@ RewriteRule "^/u/([^/]+)/?(.*)" "http://${users-to-hosts:$1|server0}/u/$1/$2 <pre class="prettyprint lang-config"># Cet exemple n'est valable que dans un contexte de répertoire RewriteCond "%{REQUEST_URI}" "!-U" -RewriteRule "^(.+)\.html$" "/regenerate_page.cgi" [PT,L]</pre> +RewriteRule "^(.+)\.html$" "/regenerate_page.cgi" [PT,L]</pre> <p>L'opérateur <code>-U</code> permet de déterminer si la chaîne @@ -179,8 +179,8 @@ RewriteRule "^(.+)\.html$" "/regenerate_page.cgi" [PT,L]</pre> serveurs.</p> <pre class="prettyprint lang-config">RewriteEngine on -RewriteMap lb "rnd:/path/to/serverlist.txt" -RewriteRule "^/(.*)" "http://${lb:serveurs}/$1" [P,L]</pre> +RewriteMap lb "rnd:/path/to/serverlist.txt" +RewriteRule "^/(.*)" "http://${lb:servers}/$1" [P,L]</pre> <p><code>liste-serveurs.txt</code> contiendra la liste des serveurs :</p> @@ -324,11 +324,11 @@ RewriteRule "^foo\.html$" "foo.night.html"</pre> <dt>Description :</dt> <dd> - <p>Ici, nous voulons conserver une certaine forme de statut + <p>Nous voulons parfois conserver une certaine forme de statut lorsqu'une réécriture a eu lieu. Par exemple, vous souhaitez consigner le fait que cette réécriture a eu lieu, et vous servir - plus tard de cette information pour déterminer si une requête sera - concernée par cette réécriture. Pour y parvenir, on peut utiliser + plus tard de cette information pour déterminer si une requête était + concernée par cette réécriture. Pour ce faire, on peut utiliser une variable d'environnement.</p> </dd> @@ -349,6 +349,13 @@ RewriteRule "^/cheval/(.*)" "/poney/$1" [E=<strong>rewritten:1</strong>]</pr <pre class="prettyprint lang-config">RewriteCond "%{ENV:rewritten}" "=1"</pre> + <p>Notez que les variables d'environnement ne survivent pas à une + redirection externe. Vous devez alors utiliser le drapeau [CO] pour définir + un cookie. Pour les redirections de niveau répertoire et htaccess où la + substitution finale est traitée en tant que redirection interne, les + variables d'environnement du tour de réécriture précédent sont préfixées par + "REDIRECT_".</p> + </dd> </dl> @@ -356,7 +363,7 @@ RewriteRule "^/cheval/(.*)" "/poney/$1" [E=<strong>rewritten:1</strong>]</pr <div class="bottomlang"> <p><span>Langues Disponibles: </span><a href="../en/rewrite/advanced.html" hreflang="en" rel="alternate" title="English"> en </a> | <a href="../fr/rewrite/advanced.html" title="Français"> fr </a></p> -</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> <script type="text/javascript"><!--//--><![CDATA[//><!-- var comments_shortname = 'httpd'; var comments_identifier = 'http://httpd.apache.org/docs/2.4/rewrite/advanced.html'; @@ -374,7 +381,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/2.4/rewrite/advanced.htm } })(window, document); //--><!]]></script></div><div id="footer"> -<p class="apache">Copyright 2019 The Apache Software Foundation.<br />Autorisé sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="apache">Copyright 2024 The Apache Software Foundation.<br />Autorisé sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- if (typeof(prettyPrint) !== 'undefined') { prettyPrint(); |