Protect .svn directories using htaccess
// should be done server-wide if you can (another snippet)
<IfModule mod_rewrite.c> RewriteRule ^(.*/)?\.svn/ - [F,L] ErrorDocument 403 "Access Forbidden" IfModule>
TextSnippets > jamiew > htaccess
2824 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Jamie Wilkinson http://tramchase.com
<IfModule mod_rewrite.c> RewriteRule ^(.*/)?\.svn/ - [F,L] ErrorDocument 403 "Access Forbidden" IfModule>
<DirectoryMatch "^/.*/(\.svn|CVS)/"> Order deny,allow Deny from all DirectoryMatch>
RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
<IfModule mod_rewrite.c> RewriteEngine On # 'under construction' override RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$ RewriteRule ^(.*)$ maintenance.html IfModule>