You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Eric Covener <co...@gmail.com> on 2010/01/14 19:53:09 UTC
Re: [users@httpd] RewriteRule and VirtualDocumentRoot: How do they
interract ?
On 1/14/10, Thomas Preud'homme <th...@celest.fr> wrote:
> Greetings,
>
> === Context ===
> What I don't understand is that after the substitution,
> apache look for the file by prepending document_root (/htdocs on my server) to
> the substitution. But I use VirtualDocumentRoot and no DocumentRoot so that my
> files are usually accessed via the value of VirtualDocumentRoot.
See the PT flag + using a URL-path in your substitution instead of a
filesystem path.
PT is implicit in per-directory. It's what allows "other" modules to
to a URL->filesystem mapping, otherwise they don't see the output of
your rewrite.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] RewriteRule and VirtualDocumentRoot: How do they
interract ?
Posted by Oliver Schoenborn <sc...@cae.com>.
> From the doc :
>
>
> This flag is just a hack to enable post-processing of the output of
> RewriteRule directives, using Alias, ScriptAlias, Redirect, and other
> directives from various URI-to-filename translators
>
> If I understand well (correct me if I'm wrong), after RewriteRule has
> applied, the result is understood as a file path, that's why others
> directives (such as Alias, Redirect and so on) don't apply on the
> result. But why is the DocumentRoot prepended to the result, is it
> because it's in the core apache and not a module ?
The rewriterule transforms a URI into a new URI.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] RewriteRule and VirtualDocumentRoot: How do they interract ?
Posted by Thomas Preud'homme <th...@celest.fr>.
Le jeudi 14 janvier 2010 19:53:09, Eric Covener a écrit :
> On 1/14/10, Thomas Preud'homme <th...@celest.fr> wrote:
> > Greetings,
> >
> > === Context ===
> > What I don't understand is that after the substitution,
> > apache look for the file by prepending document_root (/htdocs on my
> > server) to the substitution. But I use VirtualDocumentRoot and no
> > DocumentRoot so that my files are usually accessed via the value of
> > VirtualDocumentRoot.
>
> See the PT flag + using a URL-path in your substitution instead of a
> filesystem path.
I thought RewriteRule with a full URL path was striping the http://server part
(I get it from the doc). So what is the difference with only matching the
remaining part of the URL ? The result of the rule I wrote is a valid URL if
prepended by http://myserver
>
> PT is implicit in per-directory. It's what allows "other" modules to
> to a URL->filesystem mapping, otherwise they don't see the output of
> your rewrite.
>
From the doc :
This flag is just a hack to enable post-processing of the output of RewriteRule
directives, using Alias, ScriptAlias, Redirect, and other directives from
various URI-to-filename translators
If I understand well (correct me if I'm wrong), after RewriteRule has applied,
the result is understood as a file path, that's why others directives (such as
Alias, Redirect and so on) don't apply on the result. But why is the
DocumentRoot prepended to the result, is it because it's in the core apache
and not a module ?
I don't use any of this directives in this vhost (I use them but only for
other vhost) for the moment. Is it also valid for handling VirtualDocumentRoot
?
Sorry for all my questions, I'd rather understand mechanisms that just making
the change and miss something important.
Best regards,
Thomas Preud'homme
P.S. : This mailing list system should set X-Mailing-List mail header to allow
proper reply to the list with good MUA