From: ArthurHoaro Date: Thu, 3 Nov 2016 12:59:18 +0000 (+0100) Subject: .htaccess files: support Apache 2.4+ syntax X-Git-Tag: v0.8.1~12^2 X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=commitdiff_plain;h=5ebc1d504bc8a8f29f49a8a4fc1c421f78677b2a .htaccess files: support Apache 2.4+ syntax If `mod_version` is enabled, the previous syntax will apply for Apache <2.4. If not, the new syntax is used by default. Fixes #676 `mod_version` identifier is `version_module` across all Apache versions. See: * https://httpd.apache.org/docs/current/mod/mod_version.html * https://httpd.apache.org/docs/2.2/mod/mod_version.html * https://serverfault.com/questions/733910/how-do-i-load-mod-version-only-if-it-isnt-built-in-to-apache Note that version_module comes built-in with Debian (and derivatives) Apache2 packages, see https://wiki.debian.org/Apache/PackagingFor24 --- diff --git a/application/.htaccess b/application/.htaccess index b584d98c..f601c1ee 100644 --- a/application/.htaccess +++ b/application/.htaccess @@ -1,2 +1,13 @@ -Allow from none -Deny from all + + = 2.4> + Require all denied + + + Allow from none + Deny from all + + + + + Require all denied + diff --git a/cache/.htaccess b/cache/.htaccess index b584d98c..f601c1ee 100644 --- a/cache/.htaccess +++ b/cache/.htaccess @@ -1,2 +1,13 @@ -Allow from none -Deny from all + + = 2.4> + Require all denied + + + Allow from none + Deny from all + + + + + Require all denied + diff --git a/data/.htaccess b/data/.htaccess index b584d98c..f601c1ee 100644 --- a/data/.htaccess +++ b/data/.htaccess @@ -1,2 +1,13 @@ -Allow from none -Deny from all + + = 2.4> + Require all denied + + + Allow from none + Deny from all + + + + + Require all denied + diff --git a/docker/.htaccess b/docker/.htaccess index b584d98c..f601c1ee 100644 --- a/docker/.htaccess +++ b/docker/.htaccess @@ -1,2 +1,13 @@ -Allow from none -Deny from all + + = 2.4> + Require all denied + + + Allow from none + Deny from all + + + + + Require all denied + diff --git a/pagecache/.htaccess b/pagecache/.htaccess index b584d98c..f601c1ee 100644 --- a/pagecache/.htaccess +++ b/pagecache/.htaccess @@ -1,2 +1,13 @@ -Allow from none -Deny from all + + = 2.4> + Require all denied + + + Allow from none + Deny from all + + + + + Require all denied + diff --git a/tests/.htaccess b/tests/.htaccess index b584d98c..f601c1ee 100644 --- a/tests/.htaccess +++ b/tests/.htaccess @@ -1,2 +1,13 @@ -Allow from none -Deny from all + + = 2.4> + Require all denied + + + Allow from none + Deny from all + + + + + Require all denied + diff --git a/tmp/.htaccess b/tmp/.htaccess index b584d98c..f601c1ee 100644 --- a/tmp/.htaccess +++ b/tmp/.htaccess @@ -1,2 +1,13 @@ -Allow from none -Deny from all + + = 2.4> + Require all denied + + + Allow from none + Deny from all + + + + + Require all denied +