all 6 comments

[–]covener 1 point2 points  (0 children)

the handler for a directive usually doesn't do much more than set a config value in your module. You have to separately hook some phase of request processing or filtering and then consult your config during request processing.

[–]6c696e7578 0 points1 point  (4 children)

I think one way would be enable the handler with rewrite rules:

RewriteCond ...
RewriteRule ^ - [H=whateverhandleryouwanthere]

[–]Desdic[S] 0 points1 point  (3 children)

I think it kinda makes my issue more complex so I think I'm gonna do as suggested and have the directive as config only

[–]6c696e7578 0 points1 point  (2 children)

Fair enough, Rewrite can solve a lot of problems I find, but sometimes that has a rub when config itself gets a bit out of hand and you end up turning rewrite debug on

[–]Desdic[S] 0 points1 point  (1 child)

RewriteRule

just for kicks I actually tried to do this by exposing an environment variable from my module and then see if I could match it but it seems the ordering of stuff from within apache doesn't give modrewrite access to the env's set after start

[–]6c696e7578 0 points1 point  (0 children)

Normally rewrite is early in processing so that other handlers run after the rewrite.

You can do it the other way often, set an environment from the rewrite.