From 6708d8b9959b3e11fe93bfcae2d206f3aad54807 Mon Sep 17 00:00:00 2001 From: Andre Malo Date: Mon, 24 Feb 2003 21:34:51 +0000 Subject: [PATCH] Well, here comes a major fix. I've splitted the patch into 3 parts for better understanding, what I'm doing there. This is part one. mod_rewrite appears to be very broken in several cases, especially on non-unix systems. However, let's start with fixing the path handling, since it's _the_ major PITA, e.g. on win32. This part removes _unused_ code. The condition is never true, because "A local rewrite in per-directory context" was caught much earlier. I'd guess this piece of code was c&p accidentally... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98781 13f79535-47bb-0310-9956-ffa450edef68 --- modules/mappers/mod_rewrite.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 7bfec784bd..75e17a1010 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -2144,19 +2144,6 @@ static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p, return 1; } - /* - * Now we are sure it is not a fully qualified URL. But - * there is still one special case left: A local rewrite in - * per-directory context, i.e. a substitution URL which is not - * an absolute path. Here we add again the initially - * stripped per-directory prefix. - */ - if (prefixstrip && !ap_os_is_path_absolute(r->pool, r->filename)) { - rewritelog(r, 3, "[per-dir %s] add per-dir prefix: %s -> %s%s", - perdir, r->filename, perdir, r->filename); - r->filename = apr_pstrcat(r->pool, perdir, r->filename, NULL); - } - /* * Finally we had to remember if a MIME-type should be * forced for this URL (`RewriteRule .. .. [T=]') -- 2.40.0