Ignore .git directories in Apache DOCROOT

Put this in a VirtualHost config block to make sure git files aren't served by the Apache process:

<Directorymatch "^/.*/\.git/">
Deny from all

Won't work in an .htaccess file.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options