The attached patch adds the VIRTUAL_DOCUMENT_ROOT so the VirtualDocumentRoot value is available to test for dynamic virtual hosts. The patch is against 2.0.55.
http://am-productions.biz/docs/patch-modules_mappers_mod_vhost_alias.c -- Anish Mistry [EMAIL PROTECTED] AM Productions http://am-productions.biz/
--- modules/mappers/mod_vhost_alias.c.orig Fri Feb 4 15:21:18 2005
+++ modules/mappers/mod_vhost_alias.c Sat Oct 22 14:39:52 2005
@@ -259,12 +259,14 @@
int ndots;
char buf[HUGE_STRING_LEN];
- char *dest, last;
+ char *dest, last, *path;
int N, M, Np, Mp, Nd, Md;
const char *start, *end;
const char *p;
+ apr_table_t *e;
+ e = r->subprocess_env;
ndots = 0;
dots[ndots++] = name-1; /* slightly naughty */
@@ -373,11 +375,20 @@
}
if (r->filename) {
+ path = apr_pstrcat(r->pool, r->filename, buf, NULL);
r->filename = apr_pstrcat(r->pool, r->filename, buf, uri, NULL);
}
else {
+ path = apr_pstrcat(r->pool, buf, NULL);
r->filename = apr_pstrcat(r->pool, buf, uri, NULL);
}
+
+ if(apr_table_get(e, "VIRTUAL_DOCUMENT_ROOT") == NULL)
+ apr_table_addn(e, "VIRTUAL_DOCUMENT_ROOT", path);
+ else
+ apr_table_set(e, "VIRTUAL_DOCUMENT_ROOT", path);
+
+
}
static int mva_translate(request_rec *r)
pgp049gphnzfX.pgp
Description: PGP signature
