[Remove entries to the current 2.0 section below, when backported]
+ *) mod_rewrite: Ignore RewriteRules in .htaccess files if the directory
+ containing the .htaccess file is requested without a trailing slash.
+ PR 20195. [André Malo]
+
*) mod_autoindex: If a directory contains a file listed in the
DirectoryIndex directive, the folder icon is no longer replaced
by the icon of that file. PR 9587.
return DECLINED;
}
+ /*
+ * .htaccess file is called before really entering the directory, i.e.:
+ * URL: http://localhost/foo and .htaccess is located in foo directory
+ * Ignore such attempts, since they may lead to undefined behaviour.
+ */
+ if (r->filename &&
+ strlen(r->filename) == strlen(dconf->directory) - 1 &&
+ (dconf->directory)[strlen(dconf->directory) - 1] == '/' &&
+ !strncmp(r->filename, dconf->directory, strlen(dconf->directory) - 1)) {
+ return DECLINED;
+ }
+
/*
* only do something under runtime if the engine is really enabled,
* for this directory, else return immediately!