So I needed to create some mod_rewrite rules only for IPv6 when httpd is
configured for both ipv4 and ipv6 modes.  This patch adds 
'RewriteCond IPV6 on' support to the ruleset.

I initially tried to see if the incoming socket was APR_INET6, but couldn't
find the right structure within the request to query.

Regards,
Ryan Phillips
--- mod_rewrite.c.old   2008-06-09 16:50:04.000000000 -0500
+++ mod_rewrite.c   2008-06-09 15:38:49.000000000 -0500
@@ -1765,6 +1765,10 @@
                 rewritelog((r, 1, ctx->perdir, "RESULT='%s'", result));
                 return (char *)result;
             }
+            else if (!strcmp(var, "IPV6")) {
+                int flag = ap_strchr_c(r->hostname, ':') != NULL;
+                return apr_pstrdup(r->pool, flag ? "on" : "off");
+            }
             break;
 
         case  5:

Reply via email to