You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Trever M. Shick" <ts...@objectwave.com> on 2001/11/28 21:44:53 UTC
Rewrite Rule
I'd like to do the following:
RewriteRule /private/* /home/%{REMOTE_USER}
Is this possible.
I've already set up authentication, but REMOTE_USER is empty every time this is evaluated.
Please help
Re: Rewrite Rule
Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 28 Nov 2001, Trever M. Shick wrote:
> I saw this after I sent the message, however, the %{la-u:remote_user} is in
> the RewriteCond directive...
>
> How can I have it evaluated in the RewriteCond to non blank,
> then use the value in the rewrite rule...
>
The % directives can be used in RewriteRules as well.
Joshua.
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Rewrite Rule
Posted by "Trever M. Shick" <ts...@objectwave.com>.
I saw this after I sent the message, however, the %{la-u:remote_user} is in
the RewriteCond directive...
How can I have it evaluated in the RewriteCond to non blank,
then use the value in the rewrite rule...
----- Original Message -----
From: <jo...@slive.ca>
To: <us...@httpd.apache.org>
Sent: Wednesday, November 28, 2001 1:59 PM
Subject: Re: Rewrite Rule
>
> On Wed, 28 Nov 2001, Trever M. Shick wrote:
>
> > I'd like to do the following:
> >
> > RewriteRule /private/* /home/%{REMOTE_USER}
> >
> > Is this possible.
> > I've already set up authentication, but REMOTE_USER is empty every time
> > this is evaluated.
>
> RewriteRules get applied before authentication is performed. Luckily,
> Ralf thought of this problem and invented the convoluted syntax
> %{LA-U:REMOTE_USER} to do an internal sub-request and grab the REMOTE_USER
> value. See:
> http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteCond
>
> Joshua.
>
>
> ---------------------------------------------------------------------
> 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
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Rewrite Rule
Posted by jo...@slive.ca.
On Wed, 28 Nov 2001, Trever M. Shick wrote:
> I'd like to do the following:
>
> RewriteRule /private/* /home/%{REMOTE_USER}
>
> Is this possible.
> I've already set up authentication, but REMOTE_USER is empty every time
> this is evaluated.
RewriteRules get applied before authentication is performed. Luckily,
Ralf thought of this problem and invented the convoluted syntax
%{LA-U:REMOTE_USER} to do an internal sub-request and grab the REMOTE_USER
value. See:
http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteCond
Joshua.
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org