From ea58754e6277dc797836000411956f0d2c195f83 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Sat, 4 Jul 2026 15:56:50 -0500 Subject: [PATCH] Fix .git block: RedirectMatch/FilesMatch are not honored on this LiteSpeed vhost, use mod_rewrite instead --- .htaccess | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.htaccess b/.htaccess index 891814e..7d98c7e 100644 --- a/.htaccess +++ b/.htaccess @@ -2,8 +2,9 @@ # The .git folder lives inside public_html (docRoot) and was found to be # directly downloadable over HTTPS (e.g. https://orbis.orbishosting.com/.git/config), # which leaked a live GitHub personal access token embedded in the remote URL. -RedirectMatch 404 /\.git - - - Require all denied - +# Note: standard Apache access-control directives (RedirectMatch, FilesMatch/ +# Require all denied, Order/Deny) are silently ignored on this LiteSpeed vhost. +# Only mod_rewrite rules are honored (confirmed via testing), hence this form. +RewriteEngine On +RewriteCond %{REQUEST_URI} ^/\.git +RewriteRule .* - [F,L]