From: Rich Bowen Date: Tue, 14 Apr 2026 19:56:54 +0000 (+0000) Subject: Wrap modules in X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b8f0cb5aff61eb81b9e5669a5a3b73379fd7dd9f;p=thirdparty%2Fapache%2Fhttpd.git Wrap modules in git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933069 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/tech.xml b/docs/manual/rewrite/tech.xml index e22c7cf8e1..15a1696c06 100644 --- a/docs/manual/rewrite/tech.xml +++ b/docs/manual/rewrite/tech.xml @@ -26,7 +26,7 @@ Apache mod_rewrite Technical Details -

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.

Module documentation @@ -47,7 +47,7 @@ and URL matching.

like URL-to-filename translation, authentication, authorization, content, and logging. (This is not an exhaustive list.)

-

mod_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 @@ -59,7 +59,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.

@@ -70,13 +70,13 @@ and URL matching.

type="section">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 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.

@@ -127,7 +127,7 @@ and URL matching.

-

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.

@@ -136,7 +136,7 @@ and URL matching.

Ruleset Processing -

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 @@ -163,9 +163,9 @@ and URL matching.

Figure 1:The control flow through the rewriting ruleset

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