https://issues.apache.org/bugzilla/show_bug.cgi?id=53152
Bug #: 53152
Summary: RewriteRule documentation: Error about per-directory
rewrites (RewriteBase)
Product: Apache httpd-2
Version: 2.5-HEAD
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Documentation
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
According to
http://httpd.apache.org/docs/trunk/en/mod/mod_rewrite.html#rewriterule
When using the rewrite engine in .htaccess files the per-directory prefix
(which always is the same for a specific directory) is automatically removed
for the RewriteRule pattern matching and automatically added after any relative
(not starting with a slash or protocol name) substitution encounters the end of
a rule set. See the RewriteBase directive for more information regarding what
prefix will be added back to relative substitions.
First, what this says about re-adding the prefix is unclear. The addition is
said to happen when any relative substitution encounters the end of a rule set.
But when does a substitution encouter the end of a rule set? The substitution
is described as a string, not as a process.
Second, I am not sure what the per-directory prefix would be, but for sure, it
is not always the same for a certain directory. For example, suppose
/var/www/computers/software/servers/httpd/doc/ is a documentation directory. An
alias to that directory is created:
Alias /htdoc /var/www/computers/software/servers/httpd/doc
Therefore, the documentation directory is accessible through either
http://example.com/htdoc/ or
http://example.com/computers/software/servers/httpd/doc/
Suppose we access index.html. The rewrite rules patterns would normally match
/htdoc/index.html
and
/computers/software/servers/httpd/doc/index.html
But they actually match "index.html" in both cases. This would mean that when
accessing index.html via the document root, the per-directory prefix of
/var/www/computers/software/servers/httpd/doc would be
/computers/software/servers/httpd/doc/. But when accessing via the alias, its
prefix would be /htdoc/.
Note typo "substition" (appears once more later in the section).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]