-*- coding: utf-8 -*-
Changes with Apache 2.5.1
+ *) mod_alias: When an alias is declared inside a Location, make sure
+ the balance of the URL is preserved to match the alias declared
+ outside a location. Fixes an error where all requests are mapped
+ to the root of the location. [Graham Leggett]
+
*) core: Be explicit if an enclosing directive contains a path or a
regex. [Graham Leggett]
unsigned int redirect_set:1;
apr_array_header_t *redirects;
const ap_expr_info_t *alias;
+ const char *alias_fake;
char *handler;
const ap_expr_info_t *redirect;
int redirect_status; /* 301, 302, 303, 410, etc */
a->redirects = apr_array_append(p, overrides->redirects, base->redirects);
a->alias = (overrides->alias_set == 0) ? base->alias : overrides->alias;
+ a->alias_fake = (overrides->alias_set == 0) ? base->alias_fake : overrides->alias_fake;
a->handler = (overrides->alias_set == 0) ? base->handler : overrides->handler;
a->alias_set = overrides->alias_set || base->alias_set;
NULL);
}
+ if (!cmd->regex) {
+ dirconf->alias_fake = cmd->path;
+ }
dirconf->handler = cmd->info;
dirconf->alias_set = 1;
return PREGSUB_ERROR;
}
+ if (dirconf->alias_fake) {
+ int l;
+
+ l = alias_matches(r->uri, dirconf->alias_fake);
+
+ if (l > 0) {
+ ap_set_context_info(r, dirconf->alias_fake, found);
+ found = apr_pstrcat(r->pool, found, r->uri + l, NULL);
+ }
+ }
+
if (dirconf->handler) { /* Set handler, and leave a note for mod_cgi */
r->handler = dirconf->handler;
apr_table_setn(r->notes, "alias-forced-type", r->handler);