--- modules/mappers/mod_vhost_alias.c# 2005-02-04 21:21:18.000000000 +0100 +++ modules/mappers/mod_vhost_alias.c 2006-03-22 15:34:01.000000000 +0100 @@ -386,6 +386,9 @@ const char *name, *map, *uri; mva_mode_e mode; const char *cgi; + + char buf[HUGE_STRING_LEN]; + char *www_name = NULL; conf = (mva_sconf_t *) ap_get_module_config(r->server->module_config, &vhost_alias_module); @@ -412,6 +415,10 @@ if (mode == VHOST_ALIAS_NAME) { name = ap_get_server_name(r); + + /* prepend www. to name */ + sprintf(buf, "www.%s", name); + www_name = buf; } else if (mode == VHOST_ALIAS_IP) { name = r->connection->local_ip; @@ -426,7 +433,7 @@ * canonical_path buffer. */ r->canonical_filename = ""; - vhost_alias_interpolate(r, name, map, uri); + vhost_alias_interpolate(r, www_name ? www_name : name, map, uri); if (cgi) { /* see is_scriptaliased() in mod_cgi */