- return path = apr_pstrcat(pool, path, "/", DT->suffix, NULL);
+ do {
+ more = 0;
+
+ if (recurlevel++ > DT->aliases.recursion) {
+ DT_LOG_ERR
+ "DomainTree: maximum alias recursion level (%ld) exceeded! "
+ "Check if you have recursive definitions of DomainTreeAlias directives.",
+ DT->aliases.recursion
+ DT_LOG_END
+ break;
+ }
+
+ for (i = 0; i < header->nelts; ++i) {
+ const char *begin, *end;
+
+ DT_LOG_DBG
+ "DomainTree: fake test = %s on %s", array[i].key, *path
+ DT_LOG_END
+
+ if (strmatch(array[i].key, *path, &begin, &end)) {
+ more = 1;
+ *path = apr_pstrcat(local_pool, "/", apr_pstrndup(local_pool, *path, begin - *path), "/", array[i].val, "/", end, NULL);
+
+ DT_LOG_DBG
+ "DomainTree: fake done = %s (%s <> %s)", *path, array[i].key, array[i].val
+ DT_LOG_END
+ }
+ }
+ } while (more && (DT->aliases.recursion > 0));
+
+ *path = apr_pstrdup(pool, struniqchr(*path, '/'));
+
+ apr_pool_destroy(local_pool);