]> granicus.if.org Git - apache/commitdiff
Well, here comes a major fix. I've splitted the patch into 3 parts
authorAndre Malo <nd@apache.org>
Mon, 24 Feb 2003 21:34:51 +0000 (21:34 +0000)
committerAndre Malo <nd@apache.org>
Mon, 24 Feb 2003 21:34:51 +0000 (21:34 +0000)
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

index 7bfec784bdd43971ee58b65a349a621146731e7d..75e17a101057b1fb40f261f7a2af77166600ab01 100644 (file)
@@ -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=<type>]')