httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <>
Subject Re: Using mod_rewrite in my authorization module. Need advice.
Date Wed, 03 Feb 2010 21:49:02 GMT
By the way. The order in which the callbacks are called is
translate_name, then authentication/authorisation and last fixups.

If you put the RewriteRule at server level then it is applied during
the translate_name callback.

If you put it inside a <Location> directive, it is applied during the
fixups callback (i.e. _after_ the authentication/authorisation!)


On Wed, Feb 3, 2010 at 22:24, Kevac Marko <> wrote:
> Hello.
> I am porting our authorization module to mpm_worker from mpm_prefork.
> This authorization module was using some ugly, but nevertheless
> working hack which messes with mod_rewrite configuration.
> This authorization module check user permissions for current url A and
> rewrites url to AA or AB according to permission check result. Because
> I didn't want to reimplement mod_rewrite and because mod_rewrite don't
> have any API for url rewriting, this ugly hack was made. I am changing
> mod_rewrite configuration on the fly, putting A->AA or A->AB
> RewriteRule to it.
> I hope you understood that. Ok. This works. But only in mpm_prefork,
> where only one execution thread exists in apache process.
> Now I need same functionality, but in mpm_worker. And I don't have
> idea how to do it easily.
> Only two ideas came into my mind:
> 1) Reimplement needed mod_rewrite functionality in out authorization module.
> 2) Patch or fork mod_rewrite module. Implement some API (like
> rewrite(from, to);) which could be used for url rewriting with full
> mod_rewrite power.
> 3) Patch mod_rewrite and enclose RewriteRules configuration with
> locks. Sick! Ugly!
> What do you think? I am looking forward for comments and advices. Thanks.
> --
> Marko Kevac
> Sent from Moscow, Mow, Russia

A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

View raw message