Last active
May 30, 2017 08:27
-
-
Save mjau-mjau/bc473382584bf2f8a53c033bb676d7b1 to your computer and use it in GitHub Desktop.
Apache deny access to directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Deny access to all files in folder | |
<IfModule mod_authz_core.c> | |
Require all denied | |
</IfModule> | |
<IfModule !mod_authz_core.c> | |
Order deny,allow | |
Deny from all | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Drop this
.htaccess
file into any directory where all file access should be blocked. This is the default .htaccess file used in X3 for protecting the/config
and/_cache
directories.Detecting
<IfModule mod_authz_core.c>
allows us to apply rule depending on Apache version.