[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apache2, mod_rewrite and RedirectMatch



On Mon, Mar 22, 2010 at 07:20:56PM +0100, Marc Aymerich wrote:
> I have an apache2.15 with a lot of redirections using redirect and
> redirectmatch directives. Today I write some mod_rewrite rules (because I
> need some conditional redirections). I put this new rewrite directives after
> my old redirect and redirectmatch rules, just at the end of the virtualhost
> definition, because I expect that apache execute first my old definitions,
> and then my new rewrite rules. But apache execute the mod_rewrite rules in
> the first place!
[...]
> There are any way to change this behavior?

No.  mod_rewrite translates names at APR_HOOK_FIRST but mod_alias at
APR_HOOK_MIDDLE.  So, whatever order your modules are loaded, you'll get
rewrite rules to be evaluated before any mod_alias translation.

-- 
Bertrand Yvain
http://www.IELO.net/

Attachment: signature.asc
Description: Digital signature


Reply to: