From a052bc916392d81e585be01b72c74cb1ce319a3a Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Thu, 31 Jan 2013 12:22:49 -0500 Subject: [PATCH] Hide .svn and .git dirs on wordpress sites --- lib/web_apps.dtl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/web_apps.dtl b/lib/web_apps.dtl index 5d4da16..39990d4 100644 --- a/lib/web_apps.dtl +++ b/lib/web_apps.dtl @@ -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.}} -- 2.20.1