You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/09/25 07:37:32 UTC

[PATCH] RedirectMatch /advertiser/(.*) $1 doesn't work

I dunno, it's not obvious to me that something like this shouldn't work:

RedirectMatch /advertiser/(.*) $1

It doesn't currently because it requires the second argument to be a url.
But that's kind of bogus for regex substitutions...

Dean

Index: mod_alias.c
===================================================================
RCS file: /export/home/cvs/apachen/src/modules/standard/mod_alias.c,v
retrieving revision 1.24
diff -u -r1.24 mod_alias.c
--- mod_alias.c	1997/09/16 05:31:56	1.24
+++ mod_alias.c	1997/09/25 05:35:23
@@ -188,7 +188,7 @@
     if (is_HTTP_REDIRECT(status)) {
 	if (!url)
 	    return "URL to redirect to is missing";
-	if (!is_url(url))
+	if (!use_regex && !is_url(url))
 	    return "Redirect to non-URL";
     }
     else {