14 lines
320 B
ApacheConf
14 lines
320 B
ApacheConf
# Deny access to .git directory
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine On
|
|
RewriteRule ^(.*/)?\.git/ - [F,L]
|
|
RewriteRule ^(.*/)?\composer\.(.*) - [F,L]
|
|
</IfModule>
|
|
|
|
# Alternatively, you can use the following directive to deny access
|
|
<FilesMatch "\.git/">
|
|
Order allow,deny
|
|
Deny from all
|
|
</FilesMatch>
|
|
|