httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <sor...@gmail.com>
Subject Re: Using mod_rewrite in my authorization module. Need advice.
Date Thu, 04 Feb 2010 11:05:00 GMT
On Thu, Feb 4, 2010 at 08:56, Kevac Marko <marko@kevac.org> wrote:
> On Thu, Feb 4, 2010 at 10:52 AM, Sorin Manolache <sorinm@gmail.com> wrote:
>> Try to set an apache request note in the authentication instead of
>> dynamically changing the configuration of mod_rewrite.c.
>>
>> Thus, you'll have something like
>>
>> RewriteRule /url %{ENV:destination}
>>
>> The configuration would be always the same, just the value of the
>> "destination" request note changes dynamically, depending on the
>> authentication.
>
> Hmmmm... Interesting. Are you sure that this works?

The expansion of %{ENV:...} works in the replacement (last argument).

> Can I do something like RewriteRule %{ENV:source} %{ENV:destination} ?

No, you cannot. The expansion does not work in the pattern (the second
argument).

But the second argument can be a regular expression. Hopefully you can
write regexps for all your cases.

S

Mime
View raw message