Permalink
Browse files

.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
  • Loading branch information...
ArthurHoaro committed Nov 3, 2016
1 parent 849d165 commit 5ebc1d504bc8a8f29f49a8a4fc1c421f78677b2a
Showing with 91 additions and 14 deletions.
  1. +13 −2 application/.htaccess
  2. +13 −2 cache/.htaccess
  3. +13 −2 data/.htaccess
  4. +13 −2 docker/.htaccess
  5. +13 −2 pagecache/.htaccess
  6. +13 −2 tests/.htaccess
  7. +13 −2 tmp/.htaccess
View
@@ -1,2 +1,13 @@
Allow from none
Deny from all
<IfModule version_module>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
<IfVersion < 2.4>
Allow from none
Deny from all
</IfVersion>
</IfModule>
<IfModule !version_module>
Require all denied
</IfModule>
View
@@ -1,2 +1,13 @@
Allow from none
Deny from all
<IfModule version_module>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
<IfVersion < 2.4>
Allow from none
Deny from all
</IfVersion>
</IfModule>
<IfModule !version_module>
Require all denied
</IfModule>
View
@@ -1,2 +1,13 @@
Allow from none
Deny from all
<IfModule version_module>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
<IfVersion < 2.4>
Allow from none
Deny from all
</IfVersion>
</IfModule>
<IfModule !version_module>
Require all denied
</IfModule>
View
@@ -1,2 +1,13 @@
Allow from none
Deny from all
<IfModule version_module>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
<IfVersion < 2.4>
Allow from none
Deny from all
</IfVersion>
</IfModule>
<IfModule !version_module>
Require all denied
</IfModule>
View
@@ -1,2 +1,13 @@
Allow from none
Deny from all
<IfModule version_module>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
<IfVersion < 2.4>
Allow from none
Deny from all
</IfVersion>
</IfModule>
<IfModule !version_module>
Require all denied
</IfModule>
View
@@ -1,2 +1,13 @@
Allow from none
Deny from all
<IfModule version_module>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
<IfVersion < 2.4>
Allow from none
Deny from all
</IfVersion>
</IfModule>
<IfModule !version_module>
Require all denied
</IfModule>
View
@@ -1,2 +1,13 @@
Allow from none
Deny from all
<IfModule version_module>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
<IfVersion < 2.4>
Allow from none
Deny from all
</IfVersion>
</IfModule>
<IfModule !version_module>
Require all denied
</IfModule>

0 comments on commit 5ebc1d5

Please sign in to comment.