Skip to content

Instantly share code, notes, and snippets.

@sanusart
Created April 2, 2014 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sanusart/22b424820d1e26fdeda9 to your computer and use it in GitHub Desktop.
Save sanusart/22b424820d1e26fdeda9 to your computer and use it in GitHub Desktop.
Block access to .git directory in document root #htaccess
RewriteEngine on
RewriteRule .*\.git/.* - [F]
@sanusart
Copy link
Author

sanusart commented May 9, 2014

Useful if deploying using git.

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