Hide .svn and .git dirs on wordpress sites release_20130131
authorClinton Ebadi <clinton@unknownlamer.org>
Thu, 31 Jan 2013 17:22:49 +0000 (12:22 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Thu, 31 Jan 2013 17:22:49 +0000 (12:22 -0500)
lib/web_apps.dtl

index 5d4da16..39990d4 100644 (file)
@@ -3,9 +3,13 @@
 val addWordPress = \ loc : (location) ->
   location loc with
     phpVersion php5;
+    rewriteRule "^(.*/)?\.svn/" "-" [forbidden, last];
+    rewriteRule "^(.*/)?\.git/" "-" [forbidden, last];
+
     rewriteCond "%{REQUEST_FILENAME}" "!-f" [];
     rewriteCond "%{REQUEST_FILENAME}" "!-d" [];
-    rewriteRule "." "/index.php" [last]
+
+    rewriteRule "." "/index.php" [last];
   end;
 {{Add a standard WordPress blog set-up code to a virtual host.  The WordPress
   files should be rooted at the location you specify.}}