On Thu, Feb 4, 2010 at 08:56, Kevac Marko <ma...@kevac.org> wrote: > On Thu, Feb 4, 2010 at 10:52 AM, Sorin Manolache <sor...@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