8335b1
--- a/modules/mappers/mod_rewrite.c	2014/01/28 19:40:17	1562174
8335b1
+++ b/modules/mappers/mod_rewrite.c	2014/02/10 18:54:23	1566702
8335b1
@@ -2139,7 +2139,10 @@
8335b1
             break;
8335b1
 
8335b1
         case 16:
8335b1
-            if (!strcmp(var, "REQUEST_FILENAME")) {
8335b1
+            if (*var == 'C' && !strcmp(var, "CONN_REMOTE_ADDR")) {
8335b1
+                result = r->connection->client_ip;
8335b1
+            }
8335b1
+            else if (!strcmp(var, "REQUEST_FILENAME")) {
8335b1
                 result = r->filename; /* same as script_filename (15) */
8335b1
             }
8335b1
             break;