Skip to content

Instantly share code, notes, and snippets.

@nl5887
Created August 18, 2015 09:04
Show Gist options
  • Select an option

  • Save nl5887/5f11b4efc8e456785869 to your computer and use it in GitHub Desktop.

Select an option

Save nl5887/5f11b4efc8e456785869 to your computer and use it in GitHub Desktop.
Globally disable hidden files Apache
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^.*/\.
RewriteRule ^(.*)$ - [R=403,L]
LogLevel alert rewrite:trace6
</IfModule>
To each virtualhost:
RewriteOptions inherit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment