Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in .htaccess file when using Apache 2.4 #63

Open
codeaddicted opened this issue Aug 10, 2018 · 0 comments
Open

Error in .htaccess file when using Apache 2.4 #63

codeaddicted opened this issue Aug 10, 2018 · 0 comments

Comments

@codeaddicted
Copy link

In apache 2.4 the Permission system drastically changed (see https://httpd.apache.org/docs/2.4/upgrading.html) the delivered .htaccess file in the vector template only works with apache 2.2.

See the below patch for a version working with both apache 2.2 and 2.4

--- .htaccess.old       2018-08-10 09:47:06.359821000 +0200
+++ .htaccess   2018-08-10 09:49:56.751821000 +0200
@@ -4,11 +4,25 @@
 #      The reason for protecting these files is to to keep searchengines/foo
 #      away from indexing files containing version information, names and/or not
 #      necessarily public template parts by default.
-<FilesMatch "^inc_(detail|cite)\.php$">
-  Order Deny,Allow
-  Deny from all
-</FilesMatch>
-<FilesMatch "^(README|README-de|COPYING|ChangeLog|CREDITS|VERSION|style\.ini|template\.info\.txt|detail\.php|main\.php|mediamanager\.php)$">
-  Order Deny,Allow
-  Deny from all
-</FilesMatch>
+
+# Apache 2.2
+<IfModule !mod_authz_core.c>
+  <FilesMatch "^inc_(detail|cite)\.php$">
+    Order Deny,Allow
+    Deny from all
+  </FilesMatch>
+  <FilesMatch "^(README|README-de|COPYING|ChangeLog|CREDITS|VERSION|style\.ini|template\.info\.txt|detail\.php|main\.php|mediamanager\.php)$">
+    Order Deny,Allow
+    Deny from all
+  </FilesMatch>
+</IfModule>
+
+# Apache 2.4
+<IfModule mod_authz_core.c>
+  <FilesMatch "^inc_(detail|cite)\.php$">
+    Require all denied
+  </FilesMatch>
+  <FilesMatch "^(README|README-de|COPYING|ChangeLog|CREDITS|VERSION|style\.ini|template\.info\.txt|detail\.php|main\.php|mediamanager\.php)$">
+    Require all denied
+  </FilesMatch>
+</IfModule>

Thanks for the awesome template!

-Codeaddicted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant