]> granicus.if.org Git - apache/commitdiff
allow RewriteEngine Off even if Options -FollowSymlinks is set.
authorAndre Malo <nd@apache.org>
Sun, 29 Dec 2002 01:46:46 +0000 (01:46 +0000)
committerAndre Malo <nd@apache.org>
Sun, 29 Dec 2002 01:46:46 +0000 (01:46 +0000)
PR: 12395
Reviewed by: Justin Erenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98122 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c

index b4ed5d6f570d6bee74ea737c756e46cd5baf303c..cff8706e72d6fe0623fe69396b6ebcbfb892eecf 100644 (file)
@@ -1413,6 +1413,14 @@ static int hook_fixup(request_rec *r)
      *  only do something under runtime if the engine is really enabled,
      *  for this directory, else return immediately!
      */
+    if (dconf->state == ENGINE_DISABLED) {
+        return DECLINED;
+    }
+
+    /*
+     *  Do the Options check after engine check, so
+     *  the user is able to explicitely turn RewriteEngine Off.
+     */
     if (!(ap_allow_options(r) & (OPT_SYM_LINKS | OPT_SYM_OWNER))) {
         /* FollowSymLinks is mandatory! */
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
@@ -1421,14 +1429,6 @@ static int hook_fixup(request_rec *r)
                      "%s", r->filename);
         return HTTP_FORBIDDEN;
     }
-    else {
-        /* FollowSymLinks is given, but the user can
-         * still turn off the rewriting engine
-         */
-        if (dconf->state == ENGINE_DISABLED) {
-            return DECLINED;
-        }
-    }
 
     /*
      *  remember the current filename before rewriting for later check