Skip to content

Instantly share code, notes, and snippets.

@sanusart
Created April 2, 2014 13:56
Show Gist options
  • Select an option

  • Save sanusart/22b424820d1e26fdeda9 to your computer and use it in GitHub Desktop.

Select an option

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

sanusart commented May 9, 2014

Copy link
Copy Markdown
Author

Useful if deploying using git.

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