Eric Covener wrote: > The patch is very easy, but I am afraid it might not be suitable to > backport to 2.2.x. > > I struggled with finding some fancy PCRE feature that would make this > work as most people expect it to -- \Z or negative lookahead, but > AFAICT they all fail to simulate the $ due to the PCRE flag being > passed. I had a quick look at the code in trunk, and it seems that the regexps are compiled on line 1749 and 1775: > ap_pregcomp(cmd->pool, cmd->path, AP_REG_EXTENDED|USE_ICASE); This regexp does not contain AP_REG_NOTEOL/PCRE_NOTEOL. The only place NOTEOL is added is in ap_directory_walk() in line 1172 of request.c. I presume it adds that this function walks through a bunch of regular expression and its to _all_ regular expression, including the DirectoryMatch where it should not be added. Right now I don't understand why ap_directory_walk() adds this flag, but aside for that, would it be an option to remove the AP_REG_NOTEOL from request.c, and instead add it to the places where all these regexps are compiled (thus add them to the ap_pregcomp() calls) instead? It's probably more work (making sure you miss no ap_pregcomp()), but that would work, and is probably a better solution than some \Z hack (of which I'm not sure it works). Regards, Freek --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx