You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2021/07/05 11:33:34 UTC
[sling-site] branch asf-site updated: Prevent git folder from being
downloaded
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new f4284dd Prevent git folder from being downloaded
f4284dd is described below
commit f4284dd1e47f2c010d89baebe50518a798a04b0c
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Jul 5 14:33:16 2021 +0300
Prevent git folder from being downloaded
---
.htaccess | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.htaccess b/.htaccess
index 3c6adb4..6a43b9e 100644
--- a/.htaccess
+++ b/.htaccess
@@ -24,6 +24,9 @@ AddDefaultCharset utf-8
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
+# Prevent git folder from being downloaded
+RedirectMatch 404 /\.git
+
# Redirects for various historical pages
Redirect Permanent /downloads.html /downloads.cgi
Redirect Permanent /media.html /