Directive execution order is performed in a very strange way in mod_substitute.

Look at the following example:

   Substitute  "s/aaa/global/inq"
   <Location /test/>
     Substitute  "s/aaa/local/inq"
   </Location>

If I have "aaa" in a page, I expect it to be replaced by "global".
No luck, it is replaced by "local".

Even more crazy:

   <Location /test/>
     Substitute  "s/aaa/local1/inq"
   </Location>
   <Location /test/>
     Substitute  "s/aaa/local2/inq"
     Substitute  "s/aaa/local3/inq"
   </Location>

I expect the first directive to execute and see "local1".
No luck again, it is replaced by "local2" - yes, not "local3".

The merging of directive by Apache is performed in the following order: global, local1, local2, local3 but directives are executed in the following order: : local2, local3, local1, global

Am I confused or should we fix that?

Thanks,

Nick

Reply via email to