Hide Git Directories With Mod Rewrite
Posted:
Monday, December 9th, 2013Last modified:
Thursday, April 9th, 2015Overview
Htaccess rule to prevent access to hidden files and directories from prying eyes. This is especially useful for .git repositories which may contain sensitive information or expose code vulnerabilities. Requires mod_rewrite.
RewriteEngine on # Block access to .hidden files and directories. RewriteRule "(^|/)\." - [F]
Source
This is taken from the Drupal default .htaccess file.
Available Wiki Topics
The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.