don't add / to / in the non-perdir


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918652 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c
index 2e7d18c..7c965a2 100644
--- a/modules/mappers/mod_rewrite.c
+++ b/modules/mappers/mod_rewrite.c
@@ -4408,17 +4408,13 @@
      */
     if (!is_proxyreq
         && !is_absolute_path(newuri)
+        && !AP_IS_SLASH(*newuri)
         && !is_absolute_uri(newuri, NULL)) {
         if (ctx->perdir) {
-            if (!AP_IS_SLASH(*newuri)) {
-                /* perdir, the newuri will be internally redirected, so
-                 * leading slash is enough even if it's an ambiguous fs path
-                 */
-                rewritelog(r, 3, ctx->perdir, "add per-dir prefix: %s -> %s%s",
-                           newuri, ctx->perdir, newuri);
+            rewritelog(r, 3, ctx->perdir, "add per-dir prefix: %s -> %s%s",
+                       newuri, ctx->perdir, newuri);
 
-                newuri = apr_pstrcat(r->pool, ctx->perdir, newuri, NULL);
-            }
+            newuri = apr_pstrcat(r->pool, ctx->perdir, newuri, NULL);
         }
         else if (!(p->flags & (RULEFLAG_PROXY | RULEFLAG_FORCEREDIRECT))) {
             /* Not an absolute URI-path and the scheme (if any) is unknown,