Created
May 26, 2011 16:24
-
-
Save mitio/993466 to your computer and use it in GitHub Desktop.
Forbid accessing of .svn folders via HTTP
This file contains 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
# Nginx | |
server { | |
# (...server definition skipped...) | |
location ~ "/\.svn" { | |
return 403; | |
} | |
} | |
# Apache's .htaccess | |
RewriteEngine On | |
<IfModule mod_rewrite.c> | |
RewriteRule ^(.*/)?\.svn/ - [F,L] | |
ErrorDocument 403 "403 Forbidden" | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment