Last active
August 29, 2022 07:28
-
-
Save explorador/e316fbd640a8777578ae6fee8ecc4ab3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# ------------------------------------------------- | |
# Protect your .git directory! | |
# (You don't want anyone to download a copy of your website) | |
# ------------------------------------------------- | |
# Add to .htaccess | |
# For Apache 2.4 | |
<DirectoryMatch "^/.*/\.git/"> | |
Require all denied | |
</DirectoryMatch> | |
# For Apache 2.2 | |
<DirectoryMatch "^/.*/\.git/"> | |
Order deny,allow | |
Deny from all | |
</DirectoryMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment