Changes with Apache 2.3.10
+ *) mod_rewrite: Add 'RewriteOptions InheritBefore' to put the base
+ rules/conditions before the overridden rules/conditions. PR 39313.
+ [Jérôme Grandjanny <jerome.grandjanny cea.fr>]
+
*) mod_autoindex: add IndexIgnoreReset to reset the list of IndexIgnored
filenames in higher precedence configuration sections. PR 24243.
[Eric Covener]
only be one of the following:</p>
<dl>
- <dt><code>inherit</code></dt>
+ <dt><code>Inherit</code></dt>
<dd>
<p>This forces the current configuration to inherit the
<strong>after</strong> rules specified in the child scope.
</note>
</dd>
+
+ <dt><code>InheritBefore</code></dt>
+ <dd>
+ <p> Like <code>Inherit</code> above, but the rules from the parent scope
+ are applied <strong>after</strong> rules specified in the child scope.
+ Available in Apache HTTP Server 2.3.10 and later.</p>
+ </dd>
+
</dl>
+
</usage>
</directivesynopsis>
#define OPTION_NONE 1<<0
#define OPTION_INHERIT 1<<1
+#define OPTION_INHERIT_BEFORE 1<<2
#ifndef RAND_MAX
#define RAND_MAX 32767
a->rewriterules = apr_array_append(p, overrides->rewriterules,
base->rewriterules);
}
+ else if (a->options & OPTION_INHERIT_BEFORE) {
+ /*
+ * local directives override
+ * and anything else is inherited (preserving order)
+ */
+ a->rewritemaps = apr_hash_overlay(p, base->rewritemaps,
+ overrides->rewritemaps);
+ a->rewriteconds = apr_array_append(p, base->rewriteconds,
+ overrides->rewriteconds);
+ a->rewriterules = apr_array_append(p, base->rewriterules,
+ overrides->rewriterules);
+ }
else {
/*
* local directives override
a->rewriterules = apr_array_append(p, overrides->rewriterules,
base->rewriterules);
}
+ else if (a->options & OPTION_INHERIT_BEFORE) {
+ a->rewriteconds = apr_array_append(p, base->rewriteconds,
+ overrides->rewriteconds);
+ a->rewriterules = apr_array_append(p, base->rewriterules,
+ overrides->rewriterules);
+ }
else {
a->rewriteconds = overrides->rewriteconds;
a->rewriterules = overrides->rewriterules;
if (!strcasecmp(w, "inherit")) {
options |= OPTION_INHERIT;
}
+ else if (!strcasecmp(w, "inheritbefore")) {
+ options |= OPTION_INHERIT_BEFORE;
+ }
else if (!strncasecmp(w, "MaxRedirects=", 13)) {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
"RewriteOptions: MaxRedirects option has been "