Skip to content

Instantly share code, notes, and snippets.

@earth3300
Created September 12, 2018 15:48
Show Gist options
  • Select an option

  • Save earth3300/ff4986ec2211a88e9401db4ea1d75cf3 to your computer and use it in GitHub Desktop.

Select an option

Save earth3300/ff4986ec2211a88e9401db4ea1d75cf3 to your computer and use it in GitHub Desktop.
Use of RequireAll to deny all access to the directory (and all subdirectories) in which this .htaccess directive is placed.
# SECURITY BEGIN
<RequireAll>
Require all denied
</RequireAll>
# SECURITY END
@earth3300
Copy link
Author

earth3300 commented Sep 12, 2018

Note: The documentation at https://httpd.apache.org/docs/2.4/howto/access.html is ambiguous. The example given is to grant access to all, and then to deny for a specific IP address. In addition, in the past, the format was different, which will be deprecated. Though only a few lines, this example is critical to absolutely deny access to all visitors, regardless of type. In addition, there is not link to the module . However, this is tested on a local machine, and working when tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment