]> granicus.if.org Git - apache/commitdiff
PR#35314: Enable path components in Redirect
authorNick Kew <niq@apache.org>
Mon, 25 Dec 2006 12:06:33 +0000 (12:06 +0000)
committerNick Kew <niq@apache.org>
Mon, 25 Dec 2006 12:06:33 +0000 (12:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@490142 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_alias.c

index b0a2517700c5bf40945899e0c71eef62ac0138ff..bde1703de7d01892d9e2b12404ba7a8c6209ed57 100644 (file)
@@ -204,7 +204,10 @@ static const char *add_redirect_internal(cmd_parms *cmd,
     if (ap_is_HTTP_REDIRECT(status)) {
         if (!url)
             return "URL to redirect to is missing";
-        if (!use_regex && !ap_is_url(url))
+        /* PR#35314: we can allow path components here;
+         * they get correctly resolved to full URLs.
+         */
+        if (!use_regex && !ap_is_url(url) && (url[0] != '/'))
             return "Redirect to non-URL";
     }
     else {