From c32f8586cf0f65eeb09123ca381f7a0ddbcf1842 Mon Sep 17 00:00:00 2001
From: Rich Bowen This document supplements the mod_rewrite
reference documentation. It provides
-a few advanced techniques using mod_rewrite.mod_rewrite.
We wish to randomly distribute load across several servers - using mod_rewrite.
+ usingmod_rewrite.
Apache comes with a load-balancing module -
mod_proxy_balancer - which is far more flexible and
-featureful than anything you can cobble together using mod_rewrite.
mod_rewrite.
By default, redirecting to an HTML anchor doesn't work,
- because mod_rewrite escapes the # character,
+ because mod_rewrite escapes the # character,
turning it into %23. This, in turn, breaks the
redirection.
mod_rewrite, by default, URL-encodes.
@@ -264,7 +264,7 @@ RewriteRule "^/~(([a-z])[a-z0-9]+)(.*)" "/home/$2Description:
We wish to use mod_rewrite to serve different content based on +
We wish to use mod_rewrite to serve different content based on
the time of day.
Ce document complète la documentation de référence du diff --git a/docs/manual/rewrite/advanced.xml.fr b/docs/manual/rewrite/advanced.xml.fr index 92bd83c3076..4d15fc89db1 100644 --- a/docs/manual/rewrite/advanced.xml.fr +++ b/docs/manual/rewrite/advanced.xml.fr @@ -3,7 +3,7 @@ - + + diff --git a/docs/manual/rewrite/htaccess.html.en.utf8 b/docs/manual/rewrite/htaccess.html.en.utf8 index 5005088db15..7519dc5ad50 100644 --- a/docs/manual/rewrite/htaccess.html.en.utf8 +++ b/docs/manual/rewrite/htaccess.html.en.utf8 @@ -30,7 +30,7 @@
This document supplements the mod_rewrite
reference documentation. It describes
-the way that the rules change when you use mod_rewrite in .htaccess files,
+the way that the rules change when you use mod_rewrite in .htaccess files,
and how to deal with these changes.
Ce document est un complément de la documentation de référence du module
diff --git a/docs/manual/rewrite/htaccess.xml.fr b/docs/manual/rewrite/htaccess.xml.fr
index 5ce8a3bf628..678b761529f 100644
--- a/docs/manual/rewrite/htaccess.xml.fr
+++ b/docs/manual/rewrite/htaccess.xml.fr
@@ -1,7 +1,7 @@
-
+
diff --git a/docs/manual/rewrite/htaccess.xml.meta b/docs/manual/rewrite/htaccess.xml.meta
index 00ee9a1c1e2..2eb75f3314b 100644
--- a/docs/manual/rewrite/htaccess.xml.meta
+++ b/docs/manual/rewrite/htaccess.xml.meta
@@ -8,6 +8,6 @@
- mod_rewrite provides the [P] flag, which allows URLs to be passed,
- via mod_proxy, to another server. Two examples are given here. In
+ mod_rewrite provides the [P] flag, which allows URLs to be passed,
+ via mod_proxy, to another server. Two examples are given here. In
one example, a URL is passed directly to another server, and served
as though it were a local URL. In the other example, we proxy
missing content to a back-end server.
Consider using either ProxyPass or ProxyPassMatch whenever possible in
- preference to mod_rewrite.
mod_rewrite.
Ce document est un complément de la documentation de référence du module
diff --git a/docs/manual/rewrite/proxy.xml.fr b/docs/manual/rewrite/proxy.xml.fr
index ccb2ff4050a..6de844187d6 100644
--- a/docs/manual/rewrite/proxy.xml.fr
+++ b/docs/manual/rewrite/proxy.xml.fr
@@ -1,7 +1,7 @@
-
+
diff --git a/docs/manual/rewrite/proxy.xml.meta b/docs/manual/rewrite/proxy.xml.meta
index 07ad4e7e07a..b3fd4080c15 100644
--- a/docs/manual/rewrite/proxy.xml.meta
+++ b/docs/manual/rewrite/proxy.xml.meta
@@ -8,6 +8,6 @@
This document supplements the mod_rewrite
reference documentation. It describes
how you can use mod_rewrite to redirect and remap
-request. This includes many examples of common uses of mod_rewrite,
+request. This includes many examples of common uses of mod_rewrite,
including detailed descriptions of how each works.
In this example, as contrasted to the internal example above, we can simply
- use the Redirect directive. mod_rewrite was used in that earlier
+ use the Redirect directive. mod_rewrite was used in that earlier
example in order to hide the redirect from the client:
Redirect "/foo.html" "/bar.html"@@ -235,9 +235,9 @@ RewriteRule "^foo\.html$" "foo.cgi" [H=cgi-script]
This example uses an often-overlooked feature of mod_rewrite, +
This example uses an often-overlooked feature of mod_rewrite,
by taking advantage of the order of execution of the ruleset. In
- particular, mod_rewrite evaluates the left-hand-side of the
+ particular, mod_rewrite evaluates the left-hand-side of the
RewriteRule before it evaluates the RewriteCond directives.
Consequently, $1 is already defined by the time the RewriteCond
directives are evaluated. This allows us to test for the existence
@@ -272,7 +272,7 @@ RewriteRule "^foo\.html$" "foo.cgi" [H=cgi-script]
The very best way to solve this doesn't involve mod_rewrite at all, +
The very best way to solve this doesn't involve mod_rewrite at all,
but rather uses the Redirect
directive placed in a virtual host for the non-canonical
hostname(s).
If, for whatever reason, you still want to use mod_rewrite
+
If, for whatever reason, you still want to use mod_rewrite
- if, for example, you need this to work with a larger set of RewriteRules -
you might use one of the recipes below.
Ce document est un complément à la Documentation de référence de
diff --git a/docs/manual/rewrite/remapping.xml.fr b/docs/manual/rewrite/remapping.xml.fr
index 9bda1e68c8e..8fbe2683684 100644
--- a/docs/manual/rewrite/remapping.xml.fr
+++ b/docs/manual/rewrite/remapping.xml.fr
@@ -1,7 +1,7 @@
-
+
diff --git a/docs/manual/rewrite/remapping.xml.meta b/docs/manual/rewrite/remapping.xml.meta
index fc4dfefebf2..5e5f6e1602e 100644
--- a/docs/manual/rewrite/remapping.xml.meta
+++ b/docs/manual/rewrite/remapping.xml.meta
@@ -8,6 +8,6 @@
This document discusses some of the technical details of mod_rewrite +
This document discusses some of the technical details of mod_rewrite
and URL matching.
API Phasesmod_rewrite acts in two of these phases (or "hooks", as they are +
mod_rewrite acts in two of these phases (or "hooks", as they are
often called) to influence how URLs may be rewritten.
First, it uses the URL-to-filename translation hook, which occurs @@ -55,7 +55,7 @@ and URL matching.
After a request comes in and a corresponding server or
virtual host has been determined, the rewriting engine starts
- processing any mod_rewrite directives appearing in the
+ processing any mod_rewrite directives appearing in the
per-server configuration. (i.e., in the main server configuration file
and <Virtualhost>
sections.) This happens in the URL-to-filename phase.
<Directory> blocks) are applied. This
happens in the Fixup phase.
- In each of these cases, mod_rewrite rewrites the +
In each of these cases, mod_rewrite rewrites the
REQUEST_URI either to a new URL, or to a filename.
In per-directory context (i.e., within .htaccess files
and Directory blocks), these rules are being applied
after a URL has already been translated to a filename. Because of
- this, the URL-path that mod_rewrite initially compares RewriteRule directives against
+ this, the URL-path that mod_rewrite initially compares RewriteRule directives against
is the full filesystem path to the translated filename with the current
directories path (including a trailing slash) removed from the front.
For even more insight into how mod_rewrite manipulates URLs in +
For even more insight into how mod_rewrite manipulates URLs in
different contexts, you should consult the log entries made during
rewriting.
Now when mod_rewrite is triggered in these two API phases, it +
Now when mod_rewrite is triggered in these two API phases, it
reads the configured rulesets from its configuration
structure (which itself was either created on startup for
per-server context or during the directory walk of the Apache
@@ -153,9 +153,9 @@ and URL matching.
First the URL is matched against the
- Pattern of each rule. If it fails, mod_rewrite
+ Pattern of each rule. If it fails, mod_rewrite
immediately stops processing this rule, and continues with the
- next rule. If the Pattern matches, mod_rewrite looks
+ next rule. If the Pattern matches, mod_rewrite looks
for corresponding rule conditions (RewriteCond directives,
appearing immediately above the RewriteRule in the configuration).
If none are present, it substitutes the URL with a new value, which is
diff --git a/docs/manual/rewrite/tech.html.fr.utf8 b/docs/manual/rewrite/tech.html.fr.utf8
index c1ca9d64ab7..89cbdfb7897 100644
--- a/docs/manual/rewrite/tech.html.fr.utf8
+++ b/docs/manual/rewrite/tech.html.fr.utf8
@@ -26,6 +26,8 @@
Ce document passe en revue certains détails techniques à propos du module mod_rewrite et de la mise en correspondance des URLs
diff --git a/docs/manual/rewrite/tech.xml.fr b/docs/manual/rewrite/tech.xml.fr index 663e4fbe79c..ebc785286a7 100644 --- a/docs/manual/rewrite/tech.xml.fr +++ b/docs/manual/rewrite/tech.xml.fr @@ -1,7 +1,7 @@ - + diff --git a/docs/manual/rewrite/tech.xml.meta b/docs/manual/rewrite/tech.xml.meta index 09c2c397464..f8fb2f4fda6 100644 --- a/docs/manual/rewrite/tech.xml.meta +++ b/docs/manual/rewrite/tech.xml.meta @@ -8,6 +8,6 @@mod_rewrite to create dynamically
configured virtual hosts.
-mod_rewrite is usually not the best way to configure
virtual hosts. You should first consider the alternatives before resorting to
mod_rewrite. See also the "how to avoid
mod_rewrite document.www., and if it does, the rewriting is
skipped.
-As with many techniques discussed in this document, mod_rewrite really
+As with many techniques discussed in this document, mod_rewrite really
isn't the best way to accomplish this task. You should, instead,
consider using mod_vhost_alias instead, as it will much
more gracefully handle anything beyond serving static files, such as any
@@ -120,15 +120,15 @@ dynamic content, and Alias resolution.
thing as the first example. The first
half is very similar to the corresponding part above, except for
some changes, required for backward compatibility and to make the
- mod_rewrite part work properly; the second half
- configures mod_rewrite to do the actual work.
mod_rewrite part work properly; the second half
+ configures mod_rewrite to do the actual work.
- Because mod_rewrite runs before other URI translation
- modules (e.g., mod_alias), mod_rewrite must
+
Because mod_rewrite runs before other URI translation
+ modules (e.g., mod_alias), mod_rewrite must
be told to explicitly ignore any URLs that would have been handled
by those modules. And, because these rules would otherwise bypass
any ScriptAlias directives, we must have
- mod_rewrite explicitly enact those mappings.
mod_rewrite explicitly enact those mappings.
# get the server name from the Host: header UseCanonicalName Off diff --git a/docs/manual/rewrite/vhosts.html.fr.utf8 b/docs/manual/rewrite/vhosts.html.fr.utf8 index 5341be324e8..77583963452 100644 --- a/docs/manual/rewrite/vhosts.html.fr.utf8 +++ b/docs/manual/rewrite/vhosts.html.fr.utf8 @@ -26,6 +26,8 @@
Ce document est un complément à la documentation de référence du module
diff --git a/docs/manual/rewrite/vhosts.xml.fr b/docs/manual/rewrite/vhosts.xml.fr
index 5f102f3935e..8b630e6ebf3 100644
--- a/docs/manual/rewrite/vhosts.xml.fr
+++ b/docs/manual/rewrite/vhosts.xml.fr
@@ -1,7 +1,7 @@
-
+
diff --git a/docs/manual/rewrite/vhosts.xml.meta b/docs/manual/rewrite/vhosts.xml.meta
index 02e019991d3..83f3ccc60ea 100644
--- a/docs/manual/rewrite/vhosts.xml.meta
+++ b/docs/manual/rewrite/vhosts.xml.meta
@@ -8,6 +8,6 @@