On 5/21/07, Neil A. Hillard <[EMAIL PROTECTED]> wrote:
Hi,

Joshua Slive wrote:

> In any case, this isn't going to work. The regular expression used in
> RewriteCond (and RewriteRule and SetEnvIf) cannot contain variables.
> It is compiled at server-start and doesn't have access to anything
> per-request.
>
> I don't think there is any way to do exactly what you want with
> standard modules. You'll need to specify the ServerName explicitly in
> the rules.

I don't believe that's true.  I have the following rewrite to remove a
prefix from the REMOTE_USER variable:

RewriteCond        %{LA-U:REMOTE_USER} ^EXT_(.*)$
RewriteRule        .* - [env=RU:%1]

and:

RewriteRule ^/$ http://%{SERVER_NAME}/site/ [R]


I haven't got a spare server to play around with at the moment, but I'm
sure something is possible.  Is it just a case of it doesn't like the
environment variable on the RHS argument?

As someone else asked, have you enabled the RewriteLog?

The regular expression part can't have a variable. In the RewriteCond
case, the regular expression is on the right, while in the RewriteRule
case it is on the left.

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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to